Bug#60979: What /etc/init.d/xxx restart does?
>>"Radim" == Radim Kolar <email@example.com> writes:
Radim> In section 3.3.2. is not clear what 'restart' does.
Radim> 1. restart=stop and start
Radim> 2. if service is running, stop it and start it, when is not
Radim> running, do not start it.
My empirical observation seems that most packages do the
former. Indeeed, I am not aware of anypackage using the second
Radim> Better is to define new standard as found in some packages:
Radim> restart=method 2
Radim> force-restart=method 1
That may violate the principle of least surprise. I would find
it strange if restart didn't start the service.
Radim> This helps system administrators to writing their crontabs scripts,
Radim> which needs to restart the service without check if service is
Radim> really running. When service was stopped by
Radim> sysadmin (for example for saving system resources) is not good
Radim> idea to restart it by cron's daily scripts.
Indeed, that is one situation where you do not want to the
service to be started. However, I have fallen into the practice of
using a restart as having an invariant that the service would be up
after the call, whether it was running or not before. Most of the
cases when I the service was not running was due to some failure, and
not be design. There are a lot of scripts that may need to be
I do agree that these two behaviours are valid, and are
required in some situations. What I do not have a handle on yet is
which is the more common case, and thus which should be the default
Either we needd restart+force-restart, or we need a
UFOs are for real: the Air Force doesn't exist.
Manoj Srivastava <firstname.lastname@example.org> <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C