Proposed guideline for init script files

Michael Schwendt bugs.michael at gmx.net
Tue Mar 6 12:26:25 UTC 2007


On Tue, 06 Mar 2007 12:51:21 +0100, Ralf Corsepius wrote:

> > > > 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).
> How many times do I have to reiterate it?
> 
> In practice, this is not an issue!
> 
> > 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.
> How many times do I have to reiterate this: This only helps if the init
> script isn't broken itself.

The script is made for the binaries. The script ought to stay in sync
with changes in the binaries. Else it would be broken.

Configuration options ought to be separated from the code (= the shell
script), so when you change the options, you still get updates to the
code. (which won't be the case for *.rpmnew)

> If you want to test: Just insert a typo into an init script and imagine
> Fedora doesn't fix it with the next upgrade.

Is this a theoretical problem? Or has this a historical background in
bugzilla?




More information about the Fedora-maintainers mailing list