Date: Sat, 31 Jul 2004 11:53:37 +0200 From: Oliver Eikemeier <eikemeier@fillmore-labs.com> To: Rob MacGregor <freebsd.macgregor@blueyonder.co.uk> Cc: current@freebsd.org Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts inports (without touching localpkg) Message-ID: <7EB1AC8B-E2D7-11D8-9C56-00039312D914@fillmore-labs.com> In-Reply-To: <200407310912.i6V9CQVJ011571@the-macgregors.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Rob MacGregor wrote: >> -----Original Message----- >> From: owner-freebsd-current@freebsd.org >> [mailto:owner-freebsd-current@freebsd.org] On Behalf Of >> Oliver Eikemeier >> >> I don't think so. The patch is completely backwards compatible, which >> means everything will run as it did before. Why should anyone be >> confused by that? > > However, everybody who's used to disabling scripts by changing the name > such > that it doesn't end in .sh is going to be badly bitten by this. > Suddenly all > those "disabled" startup scripts will run. Nope, only two kinds of scripts will be run: old-style scripts with a `.sh' extension, and new-style rc.d scripts without extension. So you should not run into an trouble with scripts renamed to `.old' or `.disabled', except when you got into the habit to *remove* the extension to disable the scripts. As stated before: localpkg will not be touched and continue to work as before. >> As stated above: everything users did before will continue to work. > > Except of course, disabling scripts by renaming them :) See above. >> Besides, the patch finally unifies /etc/rc.d and >> /usr/local/etc/rc.d in >> the most important aspect: participating in rcorder(8). A new-style >> script will do the same, no matter whether put in /etc/rc.d or >> /usr/local/etc/rc.d. > > Which is one thing I would like to see. Especially since we can start some ports early in the startup process. >>> Additionally, >>> if ports rc.d scripts are going to participate in the boot >> rcorder(8)ing >>> then they need to behave like the base system rc.d script. >> >> Jup, that is the purpose of this patch. > > Why not simply (yeah, I know, it'll be far from simple to implement) > treat any > .sh scripts that have the FreeBSD keyword as being new style, and > others as > being old style? This is simple, but wrong IMHO. Recent experience showed us that only because a .sh script has a FreeBSD keyword, it does not qualify as a new style script. Basically all current scripts rely on the documented behaviour in rc(8). To qualify as a new style script they have to be rewritten to work with the new semantics, and installed without an extension. Blindly changing documented behaviour will cause a major breakage. -Oliver
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7EB1AC8B-E2D7-11D8-9C56-00039312D914>