diff options
author | Darren 'Tadgy' Austin <darren@afterdark.org.uk> | 2019-11-07 04:27:35 +0000 |
---|---|---|
committer | Darren 'Tadgy' Austin <darren@afterdark.org.uk> | 2019-11-07 04:27:35 +0000 |
commit | faee3d63c19cf5c83e3bfbd4839e6c6de892c5a4 (patch) | |
tree | c9d07e931cbfd67a6394661da724b93d6a6ca179 /rc.inet1 | |
parent | d66ca96733f0292d4a6d1aad8bc24ecc6c4906de (diff) | |
download | slacknetsetup-faee3d63c19cf5c83e3bfbd4839e6c6de892c5a4.tar.xz |
Walk _backwards_ through interfaces when deconfiguring.
Diffstat (limited to 'rc.inet1')
-rw-r--r-- | rc.inet1 | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -416,6 +416,7 @@ if_down() { fi # Take down VLAN interface, if configured. if echo "${1}" | grep -Fq .; then + echo "/etc/rc.d/rc.inet1: /sbin/ip link delete ${1}" | $LOGGER /sbin/ip link delete ${1} fi # Kill wireless daemons if any: @@ -476,8 +477,8 @@ start() { # Function to stop the network: stop() { gateway_down - for i in "${IFNAME[@]}" ; do - if_down $i + for (( i = $MAXNICS; i >= 0; i-- )); do + if_down ${IFNAME[$i]} done virtif_destroy lo_down |