Browse Source

Use tee with wpa_passphrase so errors are visable

wpa_passphrase writes its error messages to stdout, so this needs to
tee so that errors are visable to user. Also need to enable pipefail
so that the error code still gets caught.
pull/369/head
Sam Tygier 1 year ago
committed by XECDesign
parent
commit
271177a0f7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      stage2/02-net-tweaks/01-run.sh

+ 2
- 1
stage2/02-net-tweaks/01-run.sh View File

@ -12,7 +12,8 @@ fi
if [ -v WPA_ESSID ] && [ -v WPA_PASSWORD ]; then
on_chroot <<EOF
wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" >> "/etc/wpa_supplicant/wpa_supplicant.conf"
set -o pipefail
wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" | tee -a "/etc/wpa_supplicant/wpa_supplicant.conf"
EOF
elif [ -v WPA_ESSID ]; then
cat >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf" << EOL

Loading…
Cancel
Save