summaryrefslogtreecommitdiff
path: root/stage2
diff options
context:
space:
mode:
authorHugo Hromic <hhromic@users.noreply.github.com>2019-02-18 12:54:15 +0000
committerXECDesign <XECDesign@users.noreply.github.com>2019-02-18 12:54:15 +0000
commit564f8ef1b87399c0d4b798baf83f9d2b95ac77b7 (patch)
tree5a05c7d3b76868c80f11d647e8f68a18730335e4 /stage2
parent7068086c94a5c048aad19c412e31a3a56a5c8b78 (diff)
Silence shellcheck warnings (#255)
* Made more specific shellcheck disables * Fixed variable quoting (SC2086,SC2064) * Use `$*` expansion instead of `$@` when not using arrays (SC2124) * Use cleaner `$()` syntax instead of back quotes (SC2006) * Improved comparator (SC2166) * Minor improvements in coding style Tested clean output using: `find -name "*.sh" | xargs -n1 shellcheck -x`.
Diffstat (limited to 'stage2')
-rwxr-xr-xstage2/02-net-tweaks/01-run.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/stage2/02-net-tweaks/01-run.sh b/stage2/02-net-tweaks/01-run.sh
index 6180ebc..ce5c73f 100755
--- a/stage2/02-net-tweaks/01-run.sh
+++ b/stage2/02-net-tweaks/01-run.sh
@@ -6,13 +6,11 @@ install -v -m 644 files/wait.conf "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.serv
install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant"
install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/"
-if [ -v WPA_COUNTRY ]
-then
+if [ -v WPA_COUNTRY ]; then
echo "country=${WPA_COUNTRY}" >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf"
fi
-if [ -v WPA_ESSID -a -v WPA_PASSWORD ]
-then
+if [ -v WPA_ESSID ] && [ -v WPA_PASSWORD ]; then
on_chroot <<EOF
wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" >> "/etc/wpa_supplicant/wpa_supplicant.conf"
EOF