From ef0a365fc88fd1b02883dd42e0afb0929fbfa3f4 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Sun, 18 Jul 2004 21:28:41 +0000 Subject: fixed the sysfs problem with 2.4 --- network | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'network') 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 -- cgit v1.2.3