Change -f checks to -e for /dev nodes

Check that dropbear exists before starting it
cleanup-cruft
Andrew Gaffney 16 years ago
parent 277afc2d0a
commit 3a4667a3d0

@ -2,6 +2,10 @@
# Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney
# Distributed under the GPL v2 # Distributed under the GPL v2
14 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> netboot/linuxrc.x:
Change -f checks to -e for /dev nodes Check that dropbear exists before
starting it
14 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> gen_compile.sh: 14 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> gen_compile.sh:
Explicitly set UTILS_{CC,LD,AS} if UTILS_CROSS_COMPILE is set Explicitly set UTILS_{CC,LD,AS} if UTILS_CROSS_COMPILE is set

@ -53,12 +53,12 @@ StartUp() {
/sbin/mdev -s # have mdev populate /dev /sbin/mdev -s # have mdev populate /dev
#// Create standard (non-mdev) devices #// Create standard (non-mdev) devices
if [ ! -f /dev/md0 ] if [ ! -e /dev/md0 ]
then then
makedevs /dev/md b 9 0 0 7 makedevs /dev/md b 9 0 0 7
fi fi
if [ ! -f /dev/tty0 ] if [ ! -e /dev/tty0 ]
then then
makedevs /dev/tty c 4 0 0 12 makedevs /dev/tty c 4 0 0 12
fi fi
@ -93,16 +93,19 @@ StartUp() {
#// Hostname #// Hostname
hostname netboot hostname netboot
#// Setup dropbear (sshd) if [ -n "`which dropbear 2>/dev/null`" ]
echo -e "" then
mkdir /etc/dropbear # Setup dropbear (sshd)
echo -e ">>> Generating RSA hostkey ..." echo -e ""
dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key mkdir /etc/dropbear
echo -e "" echo -e ">>> Generating RSA hostkey ..."
echo -e ">>> Generating DSS hostkey ..." dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key echo -e ""
echo -e "" echo -e ">>> Generating DSS hostkey ..."
dropbear dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
echo -e ""
dropbear
fi
#// Misc tasks #// Misc tasks
chmod +x /bin/net-setup chmod +x /bin/net-setup

Loading…
Cancel
Save