Proposed guideline for init script files

Michael Schwendt bugs.michael at gmx.net
Tue Mar 6 10:56:43 UTC 2007


On Tue, 06 Mar 2007 04:33:28 +0100, Ralf Corsepius wrote:

> On Mon, 2007-03-05 at 13:18 -0600, Callum Lerwick wrote:
> > On Wed, 2007-02-28 at 14:38 +0100, Ralf Corsepius wrote:
> > > On Wed, 2007-02-28 at 07:59 -0500, Christopher Blizzard wrote:
> > > > +1.  In general if you have to edit an init startup file, it's a bug.
> > > 
> > > Exactly ... and what can users do about it? Edit them.
> > > 
> > > With them not being marked %config users can only hope that RH/upstream
> > > fixes it before the next update blows away their edits :(
> > > 
> > > > Configuration should be in /etc/sysconfig/foo.
> > > But real bugs and missing features init scripts suffer from can't.
> > > 
> > > As I've said many times before, I consider not marking init scripts 
> > > %config a regression, Fedora will regret.
> > 
> > cp -a /etc/init.d/foo /etc/init.d/foo-custom
> > chkconfig foo off
> > chkconfig foo-custom on
> This is exactly the same, %config(noreplace) would do automatically.

Turning on a renamed service script will decouple any rpm scriptlets from
the service name. You don't get a condrestart and things like that for the
renamed service after package upgrades, for instance. Pray that the
modified service still restarts after an unexpected reboot (power-outage).

It's better to use the init-script that is provided in the packages
and keep it customised with the help of a separate config file.
Suggesting that init-scripts are a place where to %config something
is wrong already.




More information about the Fedora-maintainers mailing list