Date: Wed, 28 Jul 2004 15:02:28 +0300 From: Peter Pentchev <roam@ringlet.net> To: Mike Makonnen <mtm@identd.net> Cc: freebsd-rc@freebsd.org Subject: Re: rc.subr exits prematurely Message-ID: <20040728120228.GA1390@straylight.m.ringlet.net> In-Reply-To: <20040727163426.GB81394@rogue.acs-et.com> References: <20040727123712.GA1196@straylight.m.ringlet.net> <20040727163426.GB81394@rogue.acs-et.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 27, 2004 at 07:34:26PM +0300, Mike Makonnen wrote: > On Tue, Jul 27, 2004 at 03:37:12PM +0300, Peter Pentchev wrote: > > Hi, > >=20 > > With the recent changes to rc.subr so that it executes port startup scr= ipts > > in the same shell instead of in a subshell, another problem has come up. > > For the scripts which record a PID file, a check is made on startup and= on > > shutdown for the PID file's existence, and if it fails, rc.subr exits, = which > > prevents the rest of the scripts from being executed. Attached is a qu= ick > > patch which works around this problem, but may introduce others - I'm n= ot > > quite sure I understand all of rc.subr's internal workings :) > >=20 >=20 > The brokeness is in the port startup script. One of the things ports > scripts need to do is install the script without a .sh suffix, so that > it does not get executed in the parent shell, and instead in a subshell. >=20 > The only things that should get executed in the same shell are scripts > like rc.d/rcconf.sh, which is there to load the contents of rc.conf. Okay, so rc scripts that expect to be called in a subshell should be named without the '.sh' suffix. What does this mean for 4.x though, where only scripts *with* the '.sh' suffix are ever executed? Should the ports provide differently-named scripts for 4.x and 5.x (or rather, for OSVERSION's before and after the rc.subr overhaul)? G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 When you are not looking at it, this sentence is in Spanish. --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBB5XU7Ri2jRYZRVMRAqaKAJ9PWFHAjmUWfa1jc1txHoP8h4mM4wCeJH9U mwu0O1tdIZj5jDnDuzxUvQI= =rA6v -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040728120228.GA1390>