From 5ac9b45fe392a70c7325aac65ff02f572cdf1cff Mon Sep 17 00:00:00 2001 From: Rémy Oudompheng Date: Sun, 19 Jun 2011 21:46:47 +0200 Subject: Add /etc/conf.d/netcfg for net-auto-wireless configuration. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Oudompheng --- src-wireless/netcfg-auto-wireless | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src-wireless/netcfg-auto-wireless') diff --git a/src-wireless/netcfg-auto-wireless b/src-wireless/netcfg-auto-wireless index b915272..a3e3fb9 100644 --- a/src-wireless/netcfg-auto-wireless +++ b/src-wireless/netcfg-auto-wireless @@ -4,6 +4,7 @@ . /usr/lib/network/network . $SUBR_DIR/rfkill . $SUBR_DIR/8021x +. /etc/conf.d/netcfg # wifi_auto # autoconnect wireless interface @@ -30,9 +31,11 @@ wifi_auto() local found_profile + [ -z "$AUTO_PROFILES" ] && AUTO_PROFILES=$(list_profiles) + # JP: add ability to use AP instead of ESSID while read ap essid; do - while read network; do + echo $AUTO_PROFILES | while read network; do ( unset CONNECTION INTERFACE AP ESSID load_profile "$network" @@ -58,7 +61,7 @@ wifi_auto() 1) found_profile="$network" ;; esac - done < <(list_profiles) # avoid subshell we'd get by piping list_profiles to while read + done done < "$networks" # avoid subshell; list_networks returns name of a tmp file rm -f "$networks" # shouldn't we delete the tmp file? -- cgit v1.2.3-24-g4f1b