From e9c36cc1ef0e17d80d279a06f15833e8da13ffb2 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Wed, 23 Apr 2014 15:09:32 +0200 Subject: Minor fixes - Don't bring an interface down if it is not brought up for wireless connections. - Often, `read` needs '-r'. --- src/lib/connections/wireless | 1 - 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 -- cgit v1.2.3-24-g4f1b