Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2001 19:45:31 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        "David O'Brien" <obrien@freebsd.org>
Cc:        Andrea Campi <andrea@webcom.it>, Hajimu UMEMOTO <ume@mahoroba.org>, cvs-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/etc rc
Message-ID:  <20010924194531.A16692@student.uu.se>
In-Reply-To: <20010924103456.C9322@dragon.nuxi.com>
References:  <200109240303.f8O33qB64939@freefall.freebsd.org> <20010924175857.A21878@webcom.it> <20010925.015110.21914758.ume@mahoroba.org> <20010924192019.A22181@webcom.it> <20010924103456.C9322@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 24, 2001 at 10:34:56AM -0700, David O'Brien wrote:
> On Mon, Sep 24, 2001 at 07:20:19PM +0200, Andrea Campi wrote:
> > I am not opposing this patch, just asking for the reasoning behind it, warning
> > that it may break POLA, and asking for at least an UPDATING entry and/or no
> > MFC.
> 
> For me it was a POLA that after I did ``vi /usr/local/etc/rc.d/foo.sh''
> the script barfed with "Bad interpreter" on the next reboot.  It took me a
> while to realize what in the world was wrong.  /etc/rc uses `sh' to run
> ${diskless_mount}, /etc/rc.devfs, and /etc/rc.local (which
> /usr/local/etc/rc.d/ is the 2nd generation of).
> 
> Also note that explicitly /usr/local/etc/rc.d/*.sh is run, not `*', but
> `*.sh'.  This is so that you can move scripts out of the way.  The fact
> that `chmod -x' worked, was just an unforeseen side affect.

The rc(8) manpage says that:

  Scripts are only executed if their basename(1) matches the shell
  globbing pattern *.sh, and they are executable.  Any other files or
  directories present within the directory are silently ignored.

So the 'chmod -x' way is actually documented to work.
If the change is kept then the documentation needs to be changed too to
reflect the new reality. (And an entry in UPDATING would probably be a
very good idea.)



-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010924194531.A16692>