summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/netcfg10
-rwxr-xr-xscripts/netcfg-wpa_actiond8
2 files changed, 12 insertions, 6 deletions
diff --git a/config/netcfg b/config/netcfg
index e74e5ea..59ee57c 100644
--- a/config/netcfg
+++ b/config/netcfg
@@ -5,12 +5,12 @@
# Network profiles are found in /etc/network.d
NETWORKS=(last)
-## Specify the name of your wired interface for net-auto-wired
+# Specify the name of your wired interface for net-auto-wired
WIRED_INTERFACE="eth0"
-## Specify the name of your wireless interface for net-auto-wireless
+# Specify the name of your wireless interface for net-auto-wireless
WIRELESS_INTERFACE="wlan0"
-## List of profiles that can be started by net-auto-wireless
-## defaults to the list of all wireless profiles
-#AUTO_PROFILES="profile1 profile2"
+# Array of profiles that may be started by net-auto-wireless.
+# When not specified, all wireless profiles are considered.
+#AUTO_PROFILES=("profile1" "profile2")
diff --git a/scripts/netcfg-wpa_actiond b/scripts/netcfg-wpa_actiond
index 72f3231..744b7af 100755
--- a/scripts/netcfg-wpa_actiond
+++ b/scripts/netcfg-wpa_actiond
@@ -52,7 +52,13 @@ fi
WPA_CONF="$(make_wpa_config_file $interface)"
if [[ -n "${AUTO_PROFILES}" ]]; then
- for prof in ${AUTO_PROFILES}; do echo $prof; done
+ # At some point, this can be removed.
+ if [[ ${#AUTO_PROFILES[@]} -eq 1 ]]; then
+ report_err "Please convert AUTO_PROFILES to an array in /etc/conf.d/netcfg."
+ AUTO_PROFILES=($AUTO_PROFILES)
+ fi
+
+ for prof in "${AUTO_PROFILES[@]}"; do echo "$prof"; done
else
list_profiles
fi | while read profile; do