mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
优化 SSID 和 PSK 的处理方式,增加十六进制转换以兼容非法字符
This commit is contained in:
parent
af6c762e04
commit
da2430021c
@ -230,8 +230,9 @@ if echo "purley broadwellnkv2" | grep -wq "${PLATFORM}"; then
|
||||
CMDLINE["SASmodel"]="1"
|
||||
fi
|
||||
|
||||
SSID="$(cat ${PART1_PATH}/wpa_supplicant.conf 2>/dev/null | grep 'ssid=' | cut -d'=' -f2 | sed 's/^"//; s/"$//')"
|
||||
PSK="$(cat ${PART1_PATH}/wpa_supplicant.conf 2>/dev/null | grep 'psk=' | cut -d'=' -f2 | sed 's/^"//; s/"$//')"
|
||||
SSID="$(cat ${PART1_PATH}/wpa_supplicant.conf 2>/dev/null | grep 'ssid=' | cut -d'=' -f2 | sed 's/^"//; s/"$//' | xxd -p | tr -d '\n')"
|
||||
PSK="$(cat ${PART1_PATH}/wpa_supplicant.conf 2>/dev/null | grep 'psk=' | cut -d'=' -f2 | sed 's/^"//; s/"$//' | xxd -p | tr -d '\n')"
|
||||
|
||||
if [ -n "${SSID}" ] && [ -n "${PSK}" ]; then
|
||||
CMDLINE["wpa.ssid"]="${SSID}"
|
||||
CMDLINE["wpa.psk"]="${PSK}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user