Test return code of successful empty partition table creation

This commit is contained in:
Guillaume Delacour
2015-06-29 21:33:19 +00:00
parent 00cce4dbb3
commit f8f4ea6ad3
+14
View File
@@ -115,9 +115,23 @@ Y
w
Y
EOF
ret=$?
if [ $ret -ne 0 ]
then
pretty_print "FAILED" "gdisk return $ret when creating partition table"
exit 1
fi
;;
sgdisk)
$SGDISK_BIN $TEMP_DISK -${OPT_CLEAR}
ret=$?
if [ $ret -ne 0 ]
then
pretty_print "FAILED" "sgdisk return $ret when creating partition table"
exit 1
fi
;;
esac