From 800117c41a2a188a69a32ff5ce8eddb8c67bd0c6 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Wed, 18 Jul 2012 17:57:56 +0200 Subject: network: don't check for existence of if on net_down In the absence of an interface, dhcpcd will do the right thing. Or ip will complain. --- network | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/network b/network index 14774e3..9f8b0a3 100755 --- a/network +++ b/network @@ -34,9 +34,7 @@ network_up() { } network_down() { - have_interface "$interface" || return 1 - - if [[ -f /run/dhcpcd-$interface.pid ]]; then + if [[ ! -n $address ]] && [[ -f /run/dhcpcd-$interface.pid || -f /run/dhcpcd.pid ]]; then dhcpcd -qk $interface || return 1 else ip addr flush dev $interface || return 1 -- cgit v1.2.3