diff --git a/files/initrd/opt/rr/boot.sh b/files/initrd/opt/rr/boot.sh index d4672c13..5bce165f 100755 --- a/files/initrd/opt/rr/boot.sh +++ b/files/initrd/opt/rr/boot.sh @@ -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}"