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

Re: request for a init script policy



Today, Ethan Benson <erbenson@alaska.net> wrote:
> init scripts are supposed to be simple, remember the good old unix
> tradidtion of `do one thing and do it very very well' ?  initscripts
> should do one thing: start and stop services|daemons.  thats it.

I see your point. Maybe I did get over-enthusiastic. I have not even
been able to imagine a scenario where this could be necessary yet. I'd
say, forget it (-:

>> > and even if the init.d script have a seperate file to configure them,
>> > the init.d script itself must remain a config file to dpkg.  
>> As must the seperate file itself. What if the maintainer chooses to

> that is a given.

If that is so, then this:

> since they should be nothing more then shell variables he can just
> append the new varables to the config file i suppose.  i don't think
> such a configuration system should be any more complicated then
> VAR=foo type variables.  

can't work. config files are supposed to be modified by the user and
then left alone by dpkg and everything else or to be modified by
dpkg and then left alone by the user and everything else. 

Well, either make it a configfile or make it debconfable or use some
proprietary (sic) means of updating the files.

In this scheme, conffiles are the worst possible solution: say the
user installs the new version of an init.d script which does:

rm -rf /$NEWVAR

And does not install the new (modified) version of the init.d
config-file (which is also a conffile, which is also a very different
matter).

The proprietary way is also quite .. ugly, as it means that you will
have to reinvent the wheel.

debconf might be the the best solution -- a perl routine to source
these config-files will be very easy to write -- just put every
variable (and its value, to be presented as a default) in the
config-file and every new variable into a hash and then prompt the
user for everything that is there, new and old values alike -- the old
ones just have already-present default values.

Output should be easier -- But What To Do About Comments? Oh well. (-:

> you want anything more complicated (functions et al) please switch
> to redhat and leave us alone ;-)

Yeah, right (-:

>> Anyway, it _is_ a great idea.
> lets just not smoke too much dope and get carried away like someone
> else i may have mentioned.  

That was not dope, that was me having only just crept out of
bed. Anyway, what be da difference, man? (-;

regards,
-- 
Andreas Stefan Fuchs                             in Real Life aka
asf@acm.org, asfuchs@gmx.at, asf@ycom.at         in NNTP and SMTP,
antifuchs                                        in IRCNet and
Relf Herbstfresser, Male 1/2 Elf Priest          in AD&D



Reply to: