[lsb-discuss] Patch?: Init script "[force-]reload" behaviour

Tobias Burnus tobias.burnus at physik.fu-berlin.de
Tue Jul 8 08:56:24 PDT 2003


*** This is a request for comments! ***

this is an attempt to fix this issue:
  [ 568246 ] Init action: [force-]reload and stopped service

The problem is that
   ./lsb-init-script force-reload
   ./lsb-init-script reload
show an undetermined behaviour if the service is not running.

Using start and restart one knows that the service is running afterwards.
Using try-restart one knows that it only runs if it was running.

For reload one might assume that it either does nothing (e.g. for cron
which checks the files itself or if a SIGHUP is not possible) or sends
SIGHUP, but there are actually implementations which restart or,
SIGHUP (if running) and start (if not).

I think no service should be started in this case!

For force-reload the situation is worse: It is either reload (= usually no
start of non-running programs) or restart (always run it).

I propose to use reload or try-restart, i.e. don't start the program if it
is not running.

If the program should be running at the end _and_ a SIGHUP should be used
in favour of a restart (as it makes sense for autofs),
   ./lsb-init-script reload || ./lsb-init-script restart
can be used.


PS: I used "should" (a 'behavior that is recommended programming
practice') and not "must" ('behavior that is mandatory for an
application or user') in order to give the implementors the flexibility;
especially since there is no "recommended programming practice" yet.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: init-2.diff
Url: http://lists.linux-foundation.org/pipermail/lsb-discuss/attachments/20030708/9db08ce6/attachment.txt 

More information about the lsb-discuss mailing list