aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-07-18 17:57:56 +0200
committerTom Gundersen <teg@jklm.no>2012-07-18 18:02:27 +0200
commit800117c41a2a188a69a32ff5ce8eddb8c67bd0c6 (patch)
treeb18682cafdb8f8ea0a118b32cc4a9c758f80a858
parentecc8af27039c9174301b9eb94884ccf56f00b33a (diff)
downloadinitscripts-800117c41a2a188a69a32ff5ce8eddb8c67bd0c6.tar.xz
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.
-rwxr-xr-xnetwork4
1 files changed, 1 insertions, 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