Add mkinitcpio-dropbear

This commit is contained in:
moparisthebest
2016-12-04 16:10:06 -05:00
parent 61684232f0
commit b2c3669909
5 changed files with 93 additions and 0 deletions
@@ -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
}