diff options
author | Andrew Gaffney <agaffney@gentoo.org> | 2008-12-14 15:37:33 -0600 |
---|---|---|
committer | Andrew Gaffney <agaffney@gentoo.org> | 2008-12-14 15:37:33 -0600 |
commit | 3a4667a3d09712ab7e523981db16716600905a2e (patch) | |
tree | 2f14c2ef8ee2b9240269524d3a4333d95cfcf4ce /netboot | |
parent | Explicitly set UTILS_{CC,LD,AS} if UTILS_CROSS_COMPILE is set (diff) | |
download | genkernel-3a4667a3d09712ab7e523981db16716600905a2e.tar.gz genkernel-3a4667a3d09712ab7e523981db16716600905a2e.tar.bz2 genkernel-3a4667a3d09712ab7e523981db16716600905a2e.zip |
Change -f checks to -e for /dev nodes
Check that dropbear exists before starting it
Diffstat (limited to 'netboot')
-rw-r--r-- | netboot/linuxrc.x | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/netboot/linuxrc.x b/netboot/linuxrc.x index b607fe28..e982202f 100644 --- a/netboot/linuxrc.x +++ b/netboot/linuxrc.x @@ -53,12 +53,12 @@ StartUp() { /sbin/mdev -s # have mdev populate /dev #// Create standard (non-mdev) devices - if [ ! -f /dev/md0 ] + if [ ! -e /dev/md0 ] then makedevs /dev/md b 9 0 0 7 fi - if [ ! -f /dev/tty0 ] + if [ ! -e /dev/tty0 ] then makedevs /dev/tty c 4 0 0 12 fi @@ -93,16 +93,19 @@ StartUp() { #// Hostname hostname netboot - #// Setup dropbear (sshd) - echo -e "" - mkdir /etc/dropbear - echo -e ">>> Generating RSA hostkey ..." - dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key - echo -e "" - echo -e ">>> Generating DSS hostkey ..." - dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key - echo -e "" - dropbear + if [ -n "`which dropbear 2>/dev/null`" ] + then + # Setup dropbear (sshd) + echo -e "" + mkdir /etc/dropbear + echo -e ">>> Generating RSA hostkey ..." + dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key + echo -e "" + echo -e ">>> Generating DSS hostkey ..." + dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key + echo -e "" + dropbear + fi #// Misc tasks chmod +x /bin/net-setup |