From: kn Date: Fri, 26 May 2023 11:41:50 +0000 (+0000) Subject: simplify yes/no answer handling X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=38386b36694c0e53e1ee3f424fdfbaf800075e82;p=openbsd simplify yes/no answer handling ask_yn() returns 0/1 on yes/no, so use the shorter '|| skip' found in install.sub; no functional change. OK solene --- diff --git a/distrib/amd64/common/install.md b/distrib/amd64/common/install.md index 842be5384c5..6e996c04e0e 100644 --- a/distrib/amd64/common/install.md +++ b/distrib/amd64/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.60 2023/04/26 22:45:32 kn Exp $ +# $OpenBSD: install.md,v 1.61 2023/05/26 11:41:50 kn Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. @@ -77,8 +77,7 @@ md_prep_fdisk() { return ;; [gG]*) if [[ $MDEFI != y ]]; then - ask_yn "An EFI/GPT disk may not boot. Proceed?" - [[ $resp == n ]] && continue + ask_yn "An EFI/GPT disk may not boot. Proceed?" || continue fi echo -n "Setting OpenBSD GPT partition to whole $_disk..." diff --git a/distrib/macppc/ramdisk/install.md b/distrib/macppc/ramdisk/install.md index 56247b095c6..627ded7b42d 100644 --- a/distrib/macppc/ramdisk/install.md +++ b/distrib/macppc/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.77 2023/03/27 19:43:36 kn Exp $ +# $OpenBSD: install.md,v 1.78 2023/05/26 11:41:50 kn Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. @@ -54,8 +54,7 @@ WARNING: Putting an MBR partition table on $_disk will DESTROY the existing HFS $(pdisk -l $_disk) __EOT - ask_yn "Are you *sure* you want an MBR partition table on $_disk?" - [[ $resp == n ]] && return 1 + ask_yn "Are you *sure* you want an MBR partition table on $_disk?" || return 1 fi while :; do