summaryrefslogtreecommitdiff
path: root/gdisk_test.sh
diff options
context:
space:
mode:
authorGuillaume Delacour <gui@iroqwa.org>2015-06-29 21:33:19 +0000
committerGuillaume Delacour <gui@iroqwa.org>2015-06-29 21:33:19 +0000
commitf8f4ea6ad3ad12a6d41fd4e6c3ec44c4eeb65f3d (patch)
tree09dfed051eb7a09bb42933ea3eb5204a14618557 /gdisk_test.sh
parent00cce4dbb310bc09c2dc952a05b3daf502260977 (diff)
downloadsgdisk-f8f4ea6ad3ad12a6d41fd4e6c3ec44c4eeb65f3d.tar.gz
Test return code of successful empty partition table creation
Diffstat (limited to 'gdisk_test.sh')
-rwxr-xr-xgdisk_test.sh14
1 files changed, 14 insertions, 0 deletions
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