From 85adf99d2f9319415d9684be75a4d7793864d2c2 Mon Sep 17 00:00:00 2001 From: Jakub Jankowski Date: Mon, 8 Jan 2018 04:13:11 +0100 Subject: Quote variables in tests Signed-off-by: Jakub Jankowski --- rc.wireless | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rc.wireless b/rc.wireless index a4b20a1..9113f36 100644 --- a/rc.wireless +++ b/rc.wireless @@ -62,7 +62,7 @@ LOGGER=${LOGGER:-cat} -if [ -z $IFNAME ] ; then +if [ -z "$IFNAME" ] ; then echo "WARNING: The script 'rc.wireless' must be executed by 'rc.inet1'!" | $LOGGER echo " You should run the command \"/etc/rc.d/rc.inet1 _start\" yourself." | $LOGGER return 1 2> /dev/null || exit 1 @@ -289,8 +289,8 @@ if [ "$WPA" = "wpa_supplicant" ] || [ "$WPA" = "wpaxsupplicant" ] && [ -x ${SUPP $IFCOMMAND down #WPACONF=${WPACONF:-/etc/wpa_supplicant.conf} WPA_OPTIONS="" - [ ${WPADRIVER} ] && WPA_OPTIONS="-D${WPADRIVER}" # specify the driver - [ ${WPA} = "wpaxsupplicant" ] && WPA_OPTIONS="${WPA_OPTIONS} -e" # Use external xsupplicant (disables the internal supplicant) + [ -n "$WPADRIVER" ] && WPA_OPTIONS="-D${WPADRIVER}" # specify the driver + [ "$WPA" = "wpaxsupplicant" ] && WPA_OPTIONS="${WPA_OPTIONS} -e" # Use external xsupplicant (disables the internal supplicant) # We leave a running wpa_supplicant process in peace: if pgrep --full "bin/wpa_supplicant.* -i${INTERFACE}" >/dev/null ; then -- cgit v1.2.3