Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jun 2005 11:19:04 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        "Michael W. Lucas" <mwlucas@blackhelicopters.org>, Vivek Khera <vivek@khera.org>, stable@freebsd.org
Subject:   Re: /usr/local/etc/rc.d/*.sh not working?
Message-ID:  <20050614181904.GG20371@odin.ac.hmc.edu>
In-Reply-To: <20050614164355.GA34603@falcon.midgard.homeip.net>
References:  <20050614150240.GA62949@bewilderbeast.blackhelicopters.org> <42AEF361.2010405@t-hosting.hu> <590EEFC5-8D42-40F3-B723-F62F478D09D0@khera.org> <20050614155836.GA63382@bewilderbeast.blackhelicopters.org> <20050614164355.GA34603@falcon.midgard.homeip.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--7uYPyRQQ5N0D02nI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jun 14, 2005 at 06:43:55PM +0200, Erik Trulsson wrote:
> On Tue, Jun 14, 2005 at 11:58:36AM -0400, Michael W. Lucas wrote:
> > On Tue, Jun 14, 2005 at 11:22:07AM -0400, Vivek Khera wrote:
> > >=20
> > > On Jun 14, 2005, at 11:10 AM, K?vesd?n G?bor wrote:
> > >=20
> > > >For scripts in /usr/local/etc/rc.d You should add an entry to /etc/=
=20
> > > >rc.conf.
> > > >For example, if You script is somedaemon.sh, then add =20
> > > >somedaemon_enable=3D'YES' to /etc/rc.conf and it will run at the nex=
t =20
> > > >boot.
> > > >
> > >=20
> > > but his scripts don't use rc-ng, so this is pointless.
> > >=20
> > > they should just work if they end in .sh and are executable.
> >=20
> > And this is the million-dollar question: should they?  Two things
> > could be causing this behavior:
> >=20
> > a) old-style .sh scripts are not supported, Michael needs to rewrite th=
em for rcNG
> > b) old-style .sh scripts are supported, Michael has some other system p=
roblem
> >=20
> > If a), fine.  If b), though, I need to really start digging.  Anyone
> > here know the definitive answer?
>=20
> I am fairly certain that the answer is b).
> Although old-style scripts seem to be discouraged these days, they are
> still supported as far as I can tell.  More than half of the scripts I
> have in /usr/local/etc/rc.d/ are old-style (some installed by ports
> that have not been converted to rcNG, and some purely local scripts).
> The old-style scripts work fine for me (using 5.4-STABLE.)
>=20
>=20
> One possibility is that the system mistakes your old-style scripts for
> rcNG scripts and therefore handles them wrong - but this is just a wild
> guess.

It's b) and this guess is wrong because we don't do any detection of
rcorder compatable scripts yet.  See /etc/rc.d/localpkg for exactly how
the scripts in /usr/local/etc/rc.d get run.

My suggestion would be to write up a single rc.d script that handles
everything using some combination of ifconfig_<if> style variables or a
config file.  Then you have only one script and you'll be ready to go
when we move to full rcordering (hopefully in 7.0).

-- Brooks

--=20
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

--7uYPyRQQ5N0D02nI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFCrx+XXY6L6fI4GtQRArH3AJ4s7thSM6a77CRSAjvEe2ktdZ4fcwCg4yVh
2tN59aecYK80pTQo9jUR2Ls=
=qmDc
-----END PGP SIGNATURE-----

--7uYPyRQQ5N0D02nI--



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