diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2015-01-06 18:21:54 +0100 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2015-01-12 22:08:33 +0100 |
commit | 9c5c435f6240c0293ad01c34e1e4c4b224fffea2 (patch) | |
tree | 53be8a89d408ff168d6ad0bf907bfbcf748640ea /src/netctl-auto | |
parent | d2cf9ae99834de3b8338008cae6273b967c353cd (diff) | |
download | netctl-9c5c435f6240c0293ad01c34e1e4c4b224fffea2.tar.gz netctl-9c5c435f6240c0293ad01c34e1e4c4b224fffea2.tar.xz |
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=
Diffstat (limited to 'src/netctl-auto')
-rwxr-xr-x | src/netctl-auto | 11 |
1 files changed, 4 insertions, 7 deletions
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'" ) |