diff options
| author | 2014-01-26 19:01:03 +0000 | |
|---|---|---|
| committer | 2014-01-26 19:01:03 +0000 | |
| commit | feb9c70a5faf1e71736feaef040f14be55e78a88 (patch) | |
| tree | 3ededc7bbc0fc731431c21f3833b9ee8160e17f9 | |
| parent | show that zero checksums are invalid for UDP over IPv6; input & ok bluhm@ (diff) | |
| download | wireguard-openbsd-feb9c70a5faf1e71736feaef040f14be55e78a88.tar.xz wireguard-openbsd-feb9c70a5faf1e71736feaef040f14be55e78a88.zip | |
let ask_yn() return 0 for yes, 1 for no
from and OK halex@
| -rw-r--r-- | distrib/miniroot/install.sub | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 41b0dde0def..a6c49cf7fa9 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.733 2014/01/24 01:12:10 halex Exp $ +# $OpenBSD: install.sub,v 1.734 2014/01/26 19:01:03 rpe Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback @@ -436,6 +436,7 @@ function ask_until { # $2 = the default answer (assumed to be 'n' if empty). # # Return 'y' or 'n' in $resp. +# Exit code: yes => 0, no => 1 ask_yn() { local _q=$1 _a=${2:-no} typeset -l _resp @@ -444,8 +445,8 @@ ask_yn() { ask "$_q" "$_a" _resp=$resp case $_resp in - y|yes) resp=y ; return ;; - n|no) resp=n ; return ;; + y|yes) resp=y; return 0;; + n|no) resp=n; return 1;; esac echo "'$resp' is not a valid choice." $auto && exit 1 |
