diff options
author | Judd Vinet <judd@archlinux.org> | 2004-07-18 21:28:41 +0000 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2004-07-18 21:28:41 +0000 |
commit | ef0a365fc88fd1b02883dd42e0afb0929fbfa3f4 (patch) | |
tree | b743dbb9dadc7b7f5d89ee7a0e7e524bfbeee242 /network | |
parent | 5ef7c1839eed06599d615380dae4447fe43dfb34 (diff) | |
download | initscripts-ef0a365fc88fd1b02883dd42e0afb0929fbfa3f4.tar.xz |
fixed the sysfs problem with 2.4
Diffstat (limited to 'network')
-rwxr-xr-x | network | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 |