Exit autoinstall in case of an invalid choice.
authorrpe <rpe@openbsd.org>
Fri, 9 Oct 2015 18:30:54 +0000 (18:30 +0000)
committerrpe <rpe@openbsd.org>
Fri, 9 Oct 2015 18:30:54 +0000 (18:30 +0000)
OK krw@

distrib/amd64/common/install.md

index 92e9360..d00dfad 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: install.md,v 1.42 2015/10/07 18:02:06 krw Exp $
+#      $OpenBSD: install.md,v 1.43 2015/10/09 18:30:54 rpe Exp $
 #
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -81,7 +81,11 @@ __EOT
                        echo "done."
                        return ;;
                g*|G*)
-                       [[ $MDEFI == y && $_disk == $ROOTDISK ]] || continue
+                       if [[ $MDEFI != y || $_disk != $ROOTDISK ]]; then
+                               echo "'$resp' is not a valid choice."
+                               $AUTO && exit 1
+                               continue
+                       fi
 
                        echo -n "Setting OpenBSD GPT partition to whole $_disk..."
                        fdisk -i -g -b 960 -y $_disk >/dev/null