From 432d4f0bce37bca58f2abbc1dcbde08edc3ec1b8 Mon Sep 17 00:00:00 2001 From: Mike Makonnen Date: Mon, 5 May 2008 07:43:48 +0000 Subject: [PATCH] Fix improper use of checkyesno routine. Noticed by: oliver MFC after: 1 week --- etc/rc.subr | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etc/rc.subr b/etc/rc.subr index b74a0863e788..eab10621d655 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -171,10 +171,14 @@ stop_boot() { local always - if [ -n "$1" ] && checkyesno $1; then + case $1 in + # "yes", "true", "on", or "1" + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) always=true - else + ;; + *) always=false + ;; fi if [ "$autoboot" = yes -o "$always" = true ]; then echo "ERROR: ABORTING BOOT (sending SIGTERM to parent)!"