From f8f4ea6ad3ad12a6d41fd4e6c3ec44c4eeb65f3d Mon Sep 17 00:00:00 2001 From: Guillaume Delacour Date: Mon, 29 Jun 2015 21:33:19 +0000 Subject: Test return code of successful empty partition table creation --- gdisk_test.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gdisk_test.sh') diff --git a/gdisk_test.sh b/gdisk_test.sh index 3cc60ff..25e2651 100755 --- a/gdisk_test.sh +++ b/gdisk_test.sh @@ -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 -- cgit v1.2.1