From: Nathan Wagner Date: Mon, 7 Apr 2014 07:06:42 +0000 (+0000) Subject: added check for network device X-Git-Url: https://pd.if.org/git/?p=startuptools;a=commitdiff_plain;h=aa442d5cc6c7325cbe3422a5c6cd6ec71f832ecc added check for network device --- diff --git a/scripts/ifup b/scripts/ifup index 149cb17..07395fb 100755 --- a/scripts/ifup +++ b/scripts/ifup @@ -1,5 +1,7 @@ #!/bin/sh +set -e + net=$1 saveifs="$IFS" @@ -22,6 +24,9 @@ if [ "$enable" = 'no' ]; then exit 0; fi ifup_pre +# need to check to make sure the link exists +test ip link show dev $dev >/dev/null 2>&1 || exit 1 + ip link set dev $dev up if [ "$addr" = 'dhcp' ]; then diff --git a/scripts/rc.shutdown b/scripts/rc.shutdown index ee5c439..8f324e4 100644 --- a/scripts/rc.shutdown +++ b/scripts/rc.shutdown @@ -36,7 +36,7 @@ kill_all() { fi } -text -x /etc/rc.local.shutdown && /etc/rc.local.shutdown +test -x /etc/rc.local.shutdown && /etc/rc.local.shutdown reverse() { local rev diff --git a/scripts/rc.sysinit b/scripts/rc.sysinit index 3fc5fbd..46794a6 100644 --- a/scripts/rc.sysinit +++ b/scripts/rc.sysinit @@ -39,11 +39,8 @@ mountpoint -q /dev/pts && mountpoint -q /dev/shm status_check -#status_begin mounting virtual filesystems -#mount /proc && -#mount /sys && -#mount /dev -#status_check +# bash seems to rely on this +ln -s /proc/self/fd /dev/fd # * set the host name status_begin Setting hostname @@ -128,10 +125,9 @@ fi swapon -a - # mount any remaining filesystems status_begin mounting remaining filesystems -mount -a -t noproc,sysfs,devtmpfs,devpts +mount -a -t noproc,sysfs,devtmpfs,devpts,tmpfs status_check rm -f /etc/mtab