aboutsummaryrefslogtreecommitdiffstats
path: root/setupdisk.sh
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-02 11:08:30 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-02 11:08:30 -0500
commit315ce2397efab99a8a15cd2bb73367b00f178418 (patch)
treed9798c354440ce542c2a9c5e1b93024ee56df99e /setupdisk.sh
parente8c0f5a1a0d7ccee510fa59e577cccd46d68e3f8 (diff)
Use if [[ ... ]] instead of [ ... ] and change retval check in setupdisk when checking exit code when creating partition.
Diffstat (limited to 'setupdisk.sh')
-rw-r--r--setupdisk.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/setupdisk.sh b/setupdisk.sh
index b6c4226..b79f27f 100644
--- a/setupdisk.sh
+++ b/setupdisk.sh
@@ -20,7 +20,8 @@ p
w
q
EOF
-if [[ "$?" -ne 0 ]]; then
+retval=$?
+if [[ "$retval" -ne 0 ]]; then
printf "%b" " ${IGRN}Creating partition ${IWHT}${LFS_DISK}${LFS_PART} \
${IRED}FAILED!${RST}\n"
exit 1