From d6a0382cf0e974b9f70fd9ef30d066256aa67f96 Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Tue, 9 Mar 2021 18:16:08 +0000 Subject: Take interface down at exit from rc.wireless. Thanks to davjohn. --- rc.wireless | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'rc.wireless') 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 -- cgit v1.2.3