From owner-freebsd-rc@FreeBSD.ORG Tue Mar 20 19:20:21 2007 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F05016A403; Tue, 20 Mar 2007 19:20:21 +0000 (UTC) (envelope-from sergey@toor.org.ru) Received: from gracer.toor.org.ru (gracer.toor.org.ru [82.179.163.164]) by mx1.freebsd.org (Postfix) with ESMTP id CF85F13C458; Tue, 20 Mar 2007 19:20:20 +0000 (UTC) (envelope-from sergey@toor.org.ru) Received: from localhost (localhost [127.0.0.1]) by gracer.toor.org.ru (Postfix) with ESMTP id 377502D; Tue, 20 Mar 2007 21:50:24 +0300 (MSK) From: Sergey Baturov To: Brooks Davis Date: Tue, 20 Mar 2007 21:50:16 +0300 User-Agent: KMail/1.9.5 References: <20070320151033.A9CF756@gracer.toor.org.ru> <20070320154533.GA34961@lor.one-eyed-alien.net> In-Reply-To: <20070320154533.GA34961@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2754123.tiNoKamPXr"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200703202150.23347.sergey@toor.org.ru> Cc: freebsd-rc@freebsd.org Subject: Re: mountcritlocal and mountlate issue X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Sergey Baturov List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2007 19:20:21 -0000 --nextPart2754123.tiNoKamPXr Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tue March 20 2007 18:45, Brooks Davis wrote: > On Tue, Mar 20, 2007 at 06:10:33PM +0300, Sergey Baturov wrote: > > Hi, all! > > > > I've found a small non-critical issue in /etc/rc.d/mountcritlocal > > and /etc/rc.d/mountlate scripts. The issue is the same: > > > > mount -a ... > > echo '.' > > > > case $? in > > 0) > > ;; > > *) > > ... > > > > There is no situation when 'case' would have a value other then '0' > > because 'echo' executed just before the 'case' and the last command > > exit status will almost always be zero. And the user will never see > > error message in '*' case. > > > > Is this correct? > > Yes, this is a common mistake. I think the easiest solution is > probablly to save $? after the mount call and refer to the saved value. > That and replacing the case with an if statement since test will do the > job just fine. > > -- Brooks Will this mistake be fixed in -current and/or -stable? I guess it is useful= to=20 show error message to the user. :-) =2D- Sergey Baturov --nextPart2754123.tiNoKamPXr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQBGACzvibUEe+eSHQgRAlGxAJ9JxdLsf6wltUZOieVUf8AV3DCCcwCgiebt 8NqimExLOqb7kIP6bMAMnNA= =0S6Q -----END PGP SIGNATURE----- --nextPart2754123.tiNoKamPXr--