We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d943c0b commit 214ece0Copy full SHA for 214ece0
device-setup/S33set-wpasupplicant
@@ -13,8 +13,8 @@ fi
13
14
# extract [wifi] section and access credentials device configuration
15
wifisection=$(cat ${CNFG} | grep "\[wifi\]" -A20 | grep "^$" -B20 -m1)
16
-ssid=$(echo "$wifisection" | grep SSID | awk -F '=' '{print $2}' | tr -d '" ')
17
-passwd=$(echo "$wifisection" | grep PASSWD | awk -F '=' '{print $2}' | tr -d '" ')
+ssid=$(echo "$wifisection" | grep SSID | awk -F '=' '{print $2}' | sed 's/^ *"//g' | sed 's/" *$//g')
+passwd=$(echo "$wifisection" | grep PASSWD | awk -F '=' '{print $2}' | sed 's/^ *"//g' | sed 's/" *$//g')
18
19
# define wpa_supplicant.conf with given credentials
20
wpaconf=$(cat << EOF
0 commit comments