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

Bug#60979: What /etc/init.d/xxx restart does?



Bill Allombert <allomber@math.u-bordeaux.fr> writes:

> I feel it is very important every init script behave the same. However the
> wording of section 10.3.2 is confusing:
> 
>    The init.d scripts should ensure that they will behave sensibly if invoked
>    with start when the service is already running, or with stop when it isn't,
>    and that they don't kill unfortunately-named user processes. The best way to
>    achieve this is usually to use start-stop-daemon. 
> 
> What mean 'behaving sensibly' ?

Starting and stopping a service should be idempotent, i.e. further
attempts should silently succeed. You are right that the above
paragraph could convey this better. If you have a suggestion, file
another bug with the patch.

But what became of the bug's initial issue? Changing of the semantics
of "restart" was shot down, but what about adding a maybe-restart
action for logrotate, postinst, etc.? I called it "condrestart" in one
of my packages.

-- 
Robbe



Reply to: