diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-04-15 08:32:23 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-04-15 08:32:23 -0500 |
commit | c9cb04e59113a3afb1cc9fde17dc8bb27a0a315c (patch) | |
tree | 205f4d9047a96559c2ff4f79901c457432367d2e /setupdisk.sh | |
parent | 786adf80589621bedd25488f08ba4e1dc6831282 (diff) |
Create fail and success functions and remove trailing white spaces at ends of lines.
Diffstat (limited to 'setupdisk.sh')
-rw-r--r-- | setupdisk.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/setupdisk.sh b/setupdisk.sh index b79f27f..659a621 100644 --- a/setupdisk.sh +++ b/setupdisk.sh @@ -22,14 +22,15 @@ q EOF retval=$? if [[ "$retval" -ne 0 ]]; then - printf "%b" " ${IGRN}Creating partition ${IWHT}${LFS_DISK}${LFS_PART} \ -${IRED}FAILED!${RST}\n" + printf "%b" " ${IGRN}Creating partition ${IWHT}${LFS_DISK}${LFS_PART} " + fail "FAILED!" 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 printf "%b" " ${IGRN}Creating ${IWHT}${LFS_FS}${IGRN} filesystem at \ -${IWHT}${LFS_DISK}${LFS_PART} ${IRED}FAILED!${RST}\n" +${IWHT}${LFS_DISK}${LFS_PART} " + fail "FAILED!" exit 1 fi |