Explorar el Código

installer: allow spaces in ssid and password

axtloss hace 3 años
padre
commit
d93fae71ce
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      installer.sh.in

+ 2 - 2
installer.sh.in

@@ -839,8 +839,8 @@ configure_wifi() {
         "SSID:" 1 1 "" 1 16 30 0 \
         "Encryption:" 2 1 "" 2 16 4 3 \
         "Password:" 3 1 "" 3 16 63 0 || return 1
-    set -- $(cat $ANSWER)
-    ssid="$1"; enc="$2"; pass="$3";
+    readarray -t values <<<$(cat $ANSWER)
+    ssid="${values[0]}"; enc="${values[1]}"; pass="${values[2]}"
 
     if [ -z "$ssid" ]; then
         DIALOG --msgbox "Invalid SSID." ${MSGBOXSIZE}