[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: request for a init script policy



On Sun, Jul 02, 2000 at 10:58:03PM -0700, tony mancill wrote:
> On Sun, 2 Jul 2000, Daniel Burrows wrote:
> 
> > On Fri, Jun 30, 2000 at 10:39:48AM -0700, Sean 'Shaleh' Perry <shaleh@valinux.com> was heard to say:
> > > I would like for us to get together and come up with a standard here.  Doing
> > > this will benfit everyone and hurt no one.  People who want the silly colored
> > > boot messages can wrap our init, as can users of tools like Aurora.
> > 
> >   I think this is a great idea.  Can it be a goal for woody?  Please? :)
> 
> I agree that this would a great benefit (although I don't think that we
> can attribute the trick to RedHat - they seem to have "borrowed" it from
> HP-UX, which started doing this with HP-UX 10.0 in about 1996, and it
> probably wasn't theirs to start with either).
> 
> While we're discussing this, I'd like to hear comments on the idea of
> using an /etc/rc.config.d/$package scheme, like that in HP-UX.  This file
> is a shell script that gets sourced by the /etc/init.d/$package.  It
> normally has no real code in it, merely environment variables.  What this
> buys us is the ability to let the end user modify the rc.config.d file and
> not mess with the init.d script.
> 
> As an example:  For sendmail, I'd like to have the package loaded on
> workstations, but don't want to run the daemon there, so I'd set
> "RUN_DAEMON=0" in /etc/rc.config.d/sendmail.  This way, I don't have to
> muck with /etc/init.d/sendmail to get the functionality I desire, and new
> versions of the init.d script can be installed without disturbing the
> administrator with having to accept the new version and edit it.
> 
> I realize that this makes more sense for production admins and folks that
> have to take care of lots of systems, but it doesn't seem like it would
> harm anything either.
IANADD, but if it means anything i think this is a great idea.  I have had
several problems with init scripts not getting changed to newer ones because
i have modified some variables, and just told dpkg to keep the old script.

Its trivial to change it, but this would make it a completely non-problem.

Possibly instead of having the files directly included in the package, have
a short script that is called by the postinst scripts to manage these.  What
that would buy us would be the ability for adding new variables to not
bother the admin, and it would automaticaly keep the old changes.  When
maintaining many machines all the little things to not bother the admin when
not necessary during upgrades is great.

For clarity, i mean having something like

init.d-variable sendmail RUN_DAEMON 1

being in the postinst, and if RUN_DAEMON is already defined in the 
/etc/rc.config.d/sendmail file its ignored, and if RUN_DAEMON isn't there
its added.  Should be a very small shell script i would think.

> 
>   tony@mancill.com         |  You won't get wise with the sleep still in
> http://www.debian.org      |  your eyes - no matter what your dream might be.
>                            |        (Peart)

Erik Bernhardson
journey@jps.net
--
It is better to remain silent and be considered a fool, than to speak and
remove all doubt.
	-- Abraham Lincoln

Attachment: pgpGykJPk_TvQ.pgp
Description: PGP signature


Reply to: