From owner-freebsd-stable@FreeBSD.ORG Thu May 1 04:56:52 2008 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 920211065677; Thu, 1 May 2008 04:56:52 +0000 (UTC) (envelope-from mtm@wubethiopia.com) Received: from dire.wubethiopia.com (j071.v.rootbsd.net [208.79.82.223]) by mx1.freebsd.org (Postfix) with ESMTP id 636468FC1B; Thu, 1 May 2008 04:56:52 +0000 (UTC) (envelope-from mtm@wubethiopia.com) Received: from rogue.mike.lan (unknown [213.55.71.78]) by dire.wubethiopia.com (Postfix) with ESMTPSA id 3FC014FD9505; Thu, 1 May 2008 04:56:29 +0000 (UTC) Message-ID: <48194E3A.5000609@wubethiopia.com> Date: Thu, 01 May 2008 07:59:38 +0300 From: Mike Makonnen User-Agent: Thunderbird 2.0.0.12 (X11/20080323) MIME-Version: 1.0 To: Oliver Lehmann References: <20080428173019.9741ad41.oliver@FreeBSD.org> <4817FAC3.3090304@wubethiopia.com> <20080430151402.23674a45.oliver@FreeBSD.org> In-Reply-To: <20080430151402.23674a45.oliver@FreeBSD.org> Content-Type: multipart/mixed; boundary="------------020305090805060902050004" Cc: stable@freebsd.org Subject: Re: error in src/etc/rc.d/mountcritlocal X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2008 04:56:52 -0000 This is a multi-part message in MIME format. --------------020305090805060902050004 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Oliver Lehmann wrote: > Mike Makonnen wrote: > > >> I'm not sure what you mean. The checkyesno() routine considers "true" a >> valid parameter. Could you please post the exact error you're getting. >> > > I already posted it... I'm getting: > > $true is not set properly - see rc.conf(5) > > This is because: > > you call "start_boot true" > start_boot itself calls checkyesno $1 - so it calls "checkyesno true" > > checkyesno then defines _value with "eval _value=\$${1}" so _value gets > $true which is not an allowed value. > > let me past the comment of checkyesno: > > # checkyesno var > # Test $1 variable, and warn if not set to YES or NO. > # Return 0 if it's "yes" (et al), nonzero otherwise. > > A variablename has to be handed over to checkyesno, not a value like > "true" or "yes" or whatever else. You see the error? > > Please try the attached patch. Thanks! Cheers. -- Mike Makonnen | GPG-KEY: http://people.freebsd.org/~mtm/mtm.asc mtm @ wubethiopia.com | AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm @ FreeBSD.Org | FreeBSD - http://www.freebsd.org --------------020305090805060902050004 Content-Type: text/plain; name="etc-start_boot.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="etc-start_boot.diff" Index: etc/rc.subr =================================================================== RCS file: /home/ncvs/src/etc/rc.subr,v retrieving revision 1.80 diff -u -r1.80 rc.subr --- etc/rc.subr 26 Jan 2008 11:22:11 -0000 1.80 +++ etc/rc.subr 1 May 2008 04:57:36 -0000 @@ -171,10 +171,14 @@ { 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)!" --------------020305090805060902050004--