Re: Bug#60979: What /etc/init.d/xxx restart does?
On 24-Mar-00, 01:13 (CST), Branden Robinson <email@example.com> wrote:
> Wouldn't this work just as well?
> /etc/init.d/daemon stop && /etc/init.d/daemon start
> IIRC, the former will exit with a nonzero status if there is nothing to
> kill. (Of course, for this to work, people need to be careful when using
> the --oknodo option to start-stop-daemon, or the exit status from that
> command won't be useful.)
I doubt very much this is practical at present. The policy manual
(section 3.3.2) says nothing about exit codes, and I'd guess most people
have used --oknodo to avoid unpleasant/spurious message. The only
comment in the policy manual is that scripts should "behave sensibly"
when starting (stopping) an already running (stopped) daemon. I and
perhaps many others interpeted this as "pretend it worked" -- no warning
message, no exit code. If you want to do this, you need to change (or
clarify) policy, and get all the maintainers to change their scripts.
Steve Greenland <firstname.lastname@example.org>
(Please do not CC me on mail sent to this list; I subscribe to and read
every list I post to.)