diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2014-04-23 15:09:32 +0200 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2014-04-23 15:09:32 +0200 |
commit | e9c36cc1ef0e17d80d279a06f15833e8da13ffb2 (patch) | |
tree | 141184392c9ce000113ac2f66851799d4e21e605 /src | |
parent | 72a02f90e4411f9ed2b6ec98dc079279b962476b (diff) | |
download | netctl-e9c36cc1ef0e17d80d279a06f15833e8da13ffb2.tar.gz netctl-e9c36cc1ef0e17d80d279a06f15833e8da13ffb2.tar.xz |
Minor fixes
- Don't bring an interface down if it is not brought up for wireless
connections.
- Often, `read` needs '-r'.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/connections/wireless | 1 | ||||
-rwxr-xr-x | src/wifi-menu | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/connections/wireless b/src/lib/connections/wireless index 88ca3e3..6e43864 100644 --- a/src/lib/connections/wireless +++ b/src/lib/connections/wireless @@ -32,7 +32,6 @@ wireless_up() { config_file=$(wpa_make_config_file "$Interface") if [[ -z $config_file ]]; then report_error "Could not create a wpa config file for interface '$Interface'" - bring_interface_down "$Interface" return 1 fi printf "%s\n" "network={" "$(wpa_make_config_block)" "}" >> "$config_file" diff --git a/src/wifi-menu b/src/wifi-menu index 9efa2c0..afb5a9e 100755 --- a/src/wifi-menu +++ b/src/wifi-menu @@ -35,7 +35,7 @@ quote_safe() init_profiles() { local i=0 essid profile - while read profile; do + while read -r profile; do essid=$( unset INTERFACE ESSID source "$PROFILE_DIR/$profile" > /dev/null @@ -66,7 +66,7 @@ init_profiles() init_entries() { local i=0 flags signal ssid - while IFS=$'\t' read signal flags ssid; do + while IFS=$'\t' read -r signal flags ssid; do ENTRIES[i++]="--" # $ssid might look like an option to dialog. ENTRIES[i++]=$ssid if in_array "$ssid" "${ESSIDS[@]}"; then |