1
0
mirror of https://github.com/moparisthebest/arch-ppa synced 2024-11-24 01:22:18 -05:00

Add mkinitcpio-dropbear

This commit is contained in:
Travis Burtrum 2016-12-04 16:10:06 -05:00
parent 61684232f0
commit b2c3669909
5 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# Generated by mksrcinfo v8
# Fri Oct 21 11:21:03 UTC 2016
pkgbase = mkinitcpio-dropbear
pkgdesc = Archlinux mkinitcpio hook to install and enable the dropbear daemon in early userspace
pkgver = 0.0.3
pkgrel = 4
url = https://github.com/grazzolini/mkinitcpio-dropbear
changelog = ChangeLog
arch = any
license = GPL3
depends = dropbear
depends = psmisc
optdepends = openssh: Allows the use of the same host keys used for normal access
optdepends = mkinitcpio-netconf: Network interface configuration
optdepends = mkinitcpio-ppp: PPP interface configuration
conflicts = mkinitcpio-tinyssh
source = mkinitcpio-dropbear-0.0.3.tar.gz::https://github.com/grazzolini/mkinitcpio-dropbear/archive/v0.0.3.tar.gz
sha512sums = 65d9d794411dc9da03d900655b748cdda72ad39f4b0188a25c1521ed656d9c92bbbf248b09e8eb7f345839001944fc56c10e1c1fe123a73732fea8ffb6fb78d4
pkgname = mkinitcpio-dropbear

6
src/mkinitcpio-dropbear/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
v*.tar.gz
mkinitcpio-dropbear-*-any.pkg.tar.xz
mkinitcpio-dropbear-*.tar.gz
develop.zip
pkg/*
src/*

View File

@ -0,0 +1,17 @@
2015-08-11 Giancarlo Razzolini <grazzolini@gmail.com>
* 0.0.3 :
- Correction of the hook help text.
- Changed the root user home directory to /root.
- Some other cleanups, specially regarding TMPDIR files juggling.
2015-07-28 Giancarlo Razzolini <grazzolini@gmail.com>
* 0.0.2 :
- Removed leftovers from the old dropbear_initrd_encrypt which where conflicting with mkinitcpio-utils.
2015-07-14 Giancarlo Razzolini <grazzolini@gmail.com>
* 0.0.1 :
- Initial release.
- Provide the same functionality as in dropbear_initrd_encrypt regarding dropbear.

View File

@ -0,0 +1,21 @@
# Maintainer: Giancarlo Razzolini <grazzolini@gmail.com>
pkgname=mkinitcpio-dropbear
pkgver=0.0.3
pkgrel=4
pkgdesc="Archlinux mkinitcpio hook to install and enable the dropbear daemon in early userspace"
arch=('any')
url="https://github.com/grazzolini/mkinitcpio-dropbear"
license=('GPL3')
depends=('dropbear' 'psmisc')
optdepends=('openssh: Allows the use of the same host keys used for normal access' 'mkinitcpio-netconf: Network interface configuration' 'mkinitcpio-ppp: PPP interface configuration')
conflicts=('mkinitcpio-tinyssh')
#install=$pkgname.install
source=("${pkgname}-${pkgver}.tar.gz::$url/archive/v$pkgver.tar.gz")
changelog='ChangeLog'
sha512sums=('65d9d794411dc9da03d900655b748cdda72ad39f4b0188a25c1521ed656d9c92bbbf248b09e8eb7f345839001944fc56c10e1c1fe123a73732fea8ffb6fb78d4')
package() {
install -Dm644 "$srcdir/$pkgname-$pkgver/dropbear_hook" "$pkgdir/usr/lib/initcpio/hooks/dropbear"
install -Dm644 "$srcdir/$pkgname-$pkgver/dropbear_install" "$pkgdir/usr/lib/initcpio/install/dropbear"
install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

View File

@ -0,0 +1,28 @@
#!/bin/bash
post_install() {
mkdir -p /etc/dropbear
touch /etc/dropbear/root_key
chmod 600 /etc/dropbear/root_key
cat<<INSTALLEOF
Insert your SSH public key into "/etc/dropbear/root_key", e.g. using
"cat ~/.ssh/id_rsa.pub > /etc/dropbear/root_key".
Afterwards add the "dropbear" hook after any networking hook (netconf/ppp)
and before any hook provided with the mkinitcpio-utils package in the
"HOOKS" array in "/etc/mkinitcpio.conf". Finally rebuild the initramsfs
("mkinitcpio -p linux").
INSTALLEOF
}
post_remove() {
cat<<REMOVEEOF
Remove "dropbear" from "HOOKS" in "/etc/mkinitcpio.conf", then rebuild
the initramfs ("mkinitcpio -p linux").
REMOVEEOF
}
post_upgrade() {
post_install
}