Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Aug 1999 11:59:05 -0700 (PDT)
From:      Doug <Doug@gorean.org>
To:        Sheldon Hearn <sheldonh@uunet.co.za>
Cc:        current@freebsd.org
Subject:   Re: REQ: Test /etc/rc clean-up
Message-ID:  <Pine.BSF.4.10.9908201153160.68707-100000@dt010nb9.san.rr.com>
In-Reply-To: <21889.935137150@axl.noc.iafrica.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 20 Aug 1999, Sheldon Hearn wrote:

> 
> Hi folks,
> 
> I have a diff for src/etc/rc that I'd like to have had used on a few
> machines before I commit it. I'm pretty sure I haven't made any mistakes
> with my changes, but you can never be too careful, right?
> 
> The diff homogenizes the manner in which variables are tested and is
> more careful about using variables in a manner that avoids potential
> problems that are unlikely to occur. I see it as a mostly cosmetic, but
> healthy change.

	I agree that there are a lot of things in the rc.* scripts that
need cleaning, and making the variable treatment safe and consistent is a
good start. However I'd REALLY like to emphasize again that if we're going
to do this the proper fix is to use case wherever possible. There are
numerous reasons for this, not the least of which are making the variable
case insensitive (and therefore more user friendly) and that case is a
builtin. For example:


> -if [ X$start_vinum = XYES ]; then

case "${start_vinum}" in
  [Yy][Ee][Ss] ) do whatever ;;
esac

	I have offered several times to do the work if it has a chance of
being committed, that offer is still good. Either way I think that the
cleanup effort is a good thing. 

Doug



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9908201153160.68707-100000>