aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnetwork3
1 files changed, 2 insertions, 1 deletions
diff --git a/network b/network
index dcc1206..dd834f7 100755
--- a/network
+++ b/network
@@ -22,7 +22,8 @@ ifdown()
varname="\$${1}"
eval new_ifline=$varname
if [ "$new_ifline" = "dhcp" ]; then
- /bin/kill `cat /etc/dhcpc/dhcpcd-${1}.pid`
+ [ -f /etc/dhcpc/dhcpcd-${1}.pid ] && \
+ /bin/kill `cat /etc/dhcpc/dhcpcd-${1}.pid`
else
/sbin/ifconfig $new_ifline down
fi