aboutsummaryrefslogtreecommitdiff
path: root/netcfg
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2005-12-17 00:59:04 +0000
committerJudd Vinet <judd@archlinux.org>2005-12-17 00:59:04 +0000
commit0d08cad43172cc04df237a4a4271525ad1d527b3 (patch)
treeb84a4ccf914558a0c4c91eab5d6e00ba1f948050 /netcfg
parentcee3cbb3a261ce0ba812618493e9bd253424ea3f (diff)
downloadinitscripts-0d08cad43172cc04df237a4a4271525ad1d527b3.tar.xz
final utf8 fixes, a couple small fixes for hwdetect and netcfg
Diffstat (limited to 'netcfg')
-rwxr-xr-xnetcfg8
1 files changed, 7 insertions, 1 deletions
diff --git a/netcfg b/netcfg
index 76e387c..2971084 100755
--- a/netcfg
+++ b/netcfg
@@ -52,7 +52,13 @@ stop_profile()
[ "$USEWPA" = "yes" -o "$USEWPA" = "YES" ] && wpa_cli terminate >/dev/null 2>&1
# bring down dhcpcd if we're using it
- [ "$IFOPTS" = "dhcp" -o "$IFOPTS" = "DHCP" ] && kill `cat /etc/dhcpc/dhcpcd-${INTERFACE}.pid`
+ if [ "$IFOPTS" = "dhcp" -o "$IFOPTS" = "DHCP" ]; then
+ # if the dhcp client received an unlimited lease then it just exits,
+ # so check for .pid file before trying to kill it.
+ if [ -f /etc/dhcpc/dhcpcd-${INTERFACE}.pid ]; then
+ kill `cat /etc/dhcpc/dhcpcd-${INTERFACE}.pid`
+ fi
+ fi
# bring down the interface itself
ifconfig $INTERFACE down