From 0e5897958196a6d5748973e0cce5c6e2cef9dbd5 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 23 Jan 2016 18:24:54 -0500 Subject: cmd/installer-pc: Print error on dd, (s)fdisk, or mke2fs failure --- (limited to 'src/cmd') 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 -- cgit v0.9.1