]> pd.if.org Git - startuptools/commitdiff
added check for network device
authorNathan Wagner <nw@hydaspes.if.org>
Mon, 7 Apr 2014 07:06:42 +0000 (07:06 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Mon, 7 Apr 2014 07:06:42 +0000 (07:06 +0000)
scripts/ifup
scripts/rc.shutdown
scripts/rc.sysinit

index 149cb17a69f20ec1b9cfb9d5f0c76474dd2b0f6e..07395fb4e4930ba01d48d2b3d0e0a8308aa6f712 100755 (executable)
@@ -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
index ee5c439ac476eb234f446cf3a3263dbd89105639..8f324e4e81768c3675bb2549a3d578c6a76c7757 100644 (file)
@@ -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
index 3fc5fbd00681b88e73350ace8902dbcd6845cb41..46794a6c3cf4405a14e5475b44029ee5ebaa2125 100644 (file)
@@ -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