--- /usr/bin/wifi-menu 2017-08-26 11:29:12.394454555 +0200 +++ /usr/bin/wifi-menu 2017-08-26 11:30:00.187304766 +0200 @@ -33,7 +33,7 @@ # for interface $1. init_profiles() { local i=0 essid profile - while read -r profile; do + while IFS='' read -r profile; do essid=$( unset INTERFACE ESSID source "$PROFILE_DIR/$profile" > /dev/null @@ -246,7 +246,7 @@ fi echo -n "Scanning for networks... " -CONNECTION=$(wpa_call "$INTERFACE" status 2> /dev/null | sed -n "s/^ssid=//p") +CONNECTION=$({ wpa_call "$INTERFACE" status 2> /dev/null || echo 'ssid=!NO CONNECTION'; } | sed -n "s/^ssid=//p") NETWORKS=$(wpa_supplicant_scan "$INTERFACE" 3,4,5) RETURN=$?