summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren 'Tadgy' Austin <darren@afterdark.org.uk>2021-03-09 18:16:08 +0000
committerDarren 'Tadgy' Austin <darren@afterdark.org.uk>2021-03-09 18:16:08 +0000
commitd6a0382cf0e974b9f70fd9ef30d066256aa67f96 (patch)
treed77bb1d9d557d7976c74edd95eb7a67a3dde982b
parent229b40c7d922f820341f8963e796f01159141ad1 (diff)
downloadslacknetsetup-current-20210318.tar.xz
Take interface down at exit from rc.wireless. Thanks to davjohn.current-20210318
-rw-r--r--rc.wireless10
1 files changed, 6 insertions, 4 deletions
diff --git a/rc.wireless b/rc.wireless
index 00df8c3..b9713ad 100644
--- a/rc.wireless
+++ b/rc.wireless
@@ -61,6 +61,9 @@
# 11/Nov/2019 * Darren Austin * Log to syslog, failling back to stdout.
# Output error to stderr if not called from
# rc.inet1.
+# 09/Mar/2021 * Darren Austin * Don't leave the interface in an 'up' state upon
+# exit from the script - this causes problems for
+# SLAAC in rc.inet1 when control is returned.
# ------------------------------------------------------------------------------
# If possible, log events in /var/log/messages:
@@ -326,7 +329,7 @@ if [ "$WPA" = "wpa_supplicant" ] || [ "$WPA" = "wpaxsupplicant" ] && [ -x ${SUPP
echo "$0: WPA authentication did not complete, try running '/etc/rc.d/rc.inet1 ${INTERFACE}_start' in a few seconds." | $LOGGER
fi
# Bring interface up to avoid 'not ready' errors when calling iwconfig
- # Tadgy: don't bring interface up as it interferes with SLAAC in rc.inet1
+ # Update 09/Mar/21: No point bringing it up here to be taken down at exit.
# $IFCOMMAND up
# sleep 3
else
@@ -343,7 +346,6 @@ else
echo "$0: $IWCOMMAND essid \"$ESSID\"" | $LOGGER
$IWCOMMAND essid "$ESSID"
fi
- # Tadgy: don't leave interface up as this causes problems for SLAAC in rc.inet1
- $IFCOMMAND down
- sleep 3
fi
+$IFCOMMAND down
+sleep 3