Hi,

I had again a look at this old bugreport:

Ben Finney <[EMAIL PROTECTED]> wrote:

> On 22-Feb-2006, Dan Jacobson wrote:
>> I wish
>> # /etc/init.d/some_package restart
>> would be mandatory to act just like
>> # /etc/init.d/some_package stop
>> # /etc/init.d/some_package start
>
> What does "act like" mean?
>
> I presume you *don't* mean that "restart" should always stop and then
> start the service, that would not be desirable. 

I think it would.

> Many services have the
> capability to restart without stopping and starting; 

Can you point to some more information about that?  I must admit that I
didn't work a lot with daemons lately, so I might have forgotten
something.  But I must say I have never heard about that; I don't even
know what "restart without stopping and starting" is supposed to mean.
That sounds as if you rather mean "reload configuration", but that's a
different init script target.

> that's why the
> separate command is there.

I think this is wrong.  The description in Policy is:

,----
| restart
| 
|     stop and restart the service if it's already running, otherwise
|     start the service
`----

If you were right, this would have been worded like "restart the
service, or otherwise stop it and start it again immediately".

> If you mean that "restart" should behave like a transaction that
> leaves the service in the same state as a transaction involving
> "stop" followed by "start", that's more understandable; 

I think what restart should do is:  Leave the service in the same state
as it would be if it were stopped and started again.  For whatever
reason (different connectivity, changed configuration files, ...) this
might be the same or a different state.

On the other hand, what you describe is actually what wwwoffle is
currently doing...

> but still
> ignores the times when the sysadmin deliberately *doesn't* want the
> same behaviour.

Exactly, and *this* is what this bug is about:  If you've changed
configuration files and/or the network connectivity, you can execute all
your relevant daemon's init scripts with argument "restart".  Not so
with wwwoffle, you have to call it twice, once with stop and once with
start, or you need to call wwwoffle with "-online" and appropriate -c
option.  Which isn't an alternative if you want to provide a script that
is supposed to restart a list of services.

> This is indeed a problem; it doesn't seem reasonable for a feature to
> be enabled on "restart" that is not enabled when "start" is invoked.
>
> Can you suggest wording that would forbid the behaviour you describe,
> while allowing things like "bind9 restart" to invoke the process's
> native restart mechanism?

If the service has a "restart" argument, I'd see no problem if
"initscript restart" called that.  But this is not the case here.
Anyway, what's the magic feature with "bind9 restart"?  I've googled
around a little, and I found 

http://www.rocketaware.com/man/man8/ndc.8.htm

which says:

,----
| restart
|               Causes named to be killed and restarted.
`----

That doesn't sound as if there was much more to it than just "initscript
restart". 

Regards, Frank
-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX)

Reply via email to