summaryrefslogtreecommitdiffstats
path: root/src/cmd/installer-pc.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-23 18:24:54 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-23 18:24:54 (EST)
commit0e5897958196a6d5748973e0cce5c6e2cef9dbd5 (patch)
tree55b6c5d9e69d5975d3194ae5cdbdb00cf56f4d50 /src/cmd/installer-pc.sh
parent120579750ee34fe4d43be87e41bf1ea4a58a84d9 (diff)
cmd/installer-pc: Print error on dd, (s)fdisk, or mke2fs failure
Diffstat (limited to 'src/cmd/installer-pc.sh')
-rw-r--r--src/cmd/installer-pc.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/installer-pc.sh b/src/cmd/installer-pc.sh
index 848af10..c0162cc 100644
--- a/src/cmd/installer-pc.sh
+++ b/src/cmd/installer-pc.sh
@@ -107,21 +107,25 @@ cmd_installer_pc_make_partition_and_fs()
local dev="${1}"
if ! dd if=/dev/zero of="${dev}" bs=512 count=1; then
+ error "$(get_msg 'cmd_installer_pc_dd_fail')"
return 1
fi
if ${HAVE_SFDISK}; then
if ! printf ',,83,*\n' | ${SFDISK} "${dev}"; then
+ error "$(get_msg 'cmd_installer_pc_fdisk_fail')"
return 1
fi
elif ${HAVE_FDISK}; then
if ! printf 'n\np\n1\n\n\nt\n83\na\n1\nw\n' | ${FDISK} "${dev}"
then
+ error "$(get_msg 'cmd_installer_pc_fdisk_fail')"
return 1
fi
fi
if ! ${MKE2FS} -t ext4 "${dev}1"; then
+ error "$(get_msg 'cmd_installer_pc_mkfs_fail')"
return 1
fi