aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnetwork9
-rwxr-xr-xrc.sysinit2
2 files changed, 8 insertions, 3 deletions
diff --git a/network b/network
index 9c30aa3..4cb589a 100755
--- a/network
+++ b/network
@@ -29,8 +29,13 @@ ifdown()
fi
varname="\$${1}"
eval new_ifline=$varname
- if [ "$new_ifline" = "dhcp" -a -f /etc/dhcpc/dhcpcd-${1}.pid ]; then
- /bin/kill `cat /etc/dhcpc/dhcpcd-${1}.pid`
+ if [ "$new_ifline" = "dhcp" ]; then
+ if [ -f /etc/dhcpc/dhcpcd-${1}.pid ]; then
+ /bin/kill `cat /etc/dhcpc/dhcpcd-${1}.pid`
+ else
+ # No .pid file, just bring the interface itself down
+ /sbin/ifconfig $1 down
+ fi
else
/sbin/ifconfig $new_ifline down
fi
diff --git a/rc.sysinit b/rc.sysinit
index cb639a7..a6140e5 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -20,8 +20,8 @@ printsep
/bin/dmesg -n 3
# mount /proc and /sys
-mount -n -t sysfs none /sys 2>/dev/null
mount -n -t proc none /proc
+[ "`grep sysfs /proc/filesystems`" ] && mount -n -t sysfs none /sys
if [ -e /dev/.devfsd -a -x /sbin/devfsd ]; then
# Looks like devfs is running, use it