From 9c5c435f6240c0293ad01c34e1e4c4b224fffea2 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Tue, 6 Jan 2015 18:21:54 +0100 Subject: Unify wired and wireless automatic profile selection (FS#35252) The previous wired automatic profile selection procedure was not properly documented. Now both wired and wireless automatic profile selection use ExcludeAuto= and Priority= --- src/netctl-auto | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/netctl-auto') diff --git a/src/netctl-auto b/src/netctl-auto index d9fac3a..b84c0de 100755 --- a/src/netctl-auto +++ b/src/netctl-auto @@ -192,13 +192,10 @@ start() { report_debug "Examining profile '$profile'" ( source "$PROFILE_DIR/$profile" - [[ $Interface == "$interface" ]] || continue - is_yes "${ExcludeAuto:-no}" && exit 1 - [[ $Connection != "wireless" ]] && exit 1 - : ${Security:=none} - # Exclude wpa-config, the wpa_conf is 'complete' and doesn't fit in this scheme - [[ $Security == "wpa-config" ]] && exit 1 - + [[ $Interface == "$interface" && $Connection == "wireless" ]] || exit + is_yes "${ExcludeAuto:-no}" && exit + # Set default and exclude wpa-config as it does not fit this scheme + [[ ${Security:=none} != "wpa-config" ]] || exit printf "%s\n" "network={" "$(wpa_make_config_block)" "id_str=\"$profile\"" "}" >> "$wpa_conf" report_notice "Included profile '$profile'" ) -- cgit v1.2.3-24-g4f1b