diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-04-02 11:33:59 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-04-02 11:33:59 -0500 |
commit | 09a71c051060d3b934a19ae4d9c962f7ceb44c69 (patch) | |
tree | 12b46d0b4caf7a21d9a37dc8d0de6442c929fe33 /setupdisk.sh | |
parent | f063af2cf37ddb9e542e8b085f350f79802e87e8 (diff) | |
parent | e2547734fd91c35bf3eaac1d9486b0f3c2877192 (diff) |
Merge branch 'cleanup' into chapter7
Diffstat (limited to 'setupdisk.sh')
-rw-r--r-- | setupdisk.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/setupdisk.sh b/setupdisk.sh index 6d13436..b79f27f 100644 --- a/setupdisk.sh +++ b/setupdisk.sh @@ -20,14 +20,15 @@ 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 fi printf "%b" " ${IGRN}Formatting ${IWHT}${LFS_DISK}${LFS_PART} with \ ${IWHT}${LFS_FS}${IGRN} filesystem and label ${IWHT}${LFS_VER}${RST}\n" -if ! sudo /sbin/mkfs -t ${LFS_FS,,} -L "${LFS_VER}" -F "${LFS_DISK}${LFS_PART}" >/dev/null 2>&1; then +if ! sudo /sbin/mkfs -t "${LFS_FS,,}" -L "${LFS_VER}" -F "${LFS_DISK}${LFS_PART}" >/dev/null 2>&1; then printf "%b" " ${IGRN}Creating ${IWHT}${LFS_FS}${IGRN} filesystem at \ ${IWHT}${LFS_DISK}${LFS_PART} ${IRED}FAILED!${RST}\n" exit 1 |