Re: init scripts and the "reload" target

2006-01-06 Thread Henrique de Moraes Holschuh
On Fri, 06 Jan 2006, sean finney wrote:
> fail with a non-zero value (lsb-compliant packages, i believe), sometimes
> it will exit normally without performing any action (apache 1.x for
> example), and in other cases it will start the inactive service (apache 2.x,
> for example).

Please file bugs, severity serious. These packages are broken if they are
doing what you describe.  In fact, restarting an inactive service on reload
is so utterly broken it ain't funny.

> my take on this is that, while optional, the reload target must not
> stop and start a service if implemented in an init script.  it would

Correct.  That's why many services do _not_ implement reload (because they
don't support the functionality, really).  And if you don't implement it,
you bang out with an error so that whomever called knows you didn't grok
what they told you to do in the initscript.

> then logically follow that reload must not start a service which is
> not running.

Also correct.  Force-reload is muddy waters, and it will often restart
services (truth to be told, it shouldn't but I doubt it will be fixed), but
anything restarting or starting services on reload is buggy, and
non-compliant to Debian policy.

> is my interpretation of this correct, or am i over-analyzing things?

It is correct, AFAIK.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: init scripts and the "reload" target

2006-01-06 Thread Hamish Moffatt
On Fri, Jan 06, 2006 at 03:19:58AM -0500, sean finney wrote:
> a while back, i noticed that there seems to be some rather inconsistent
> behaviour wrt doing "/etc/init.d/foo reload".
> 
> typically this results in a HUP or something similar sent to the daemon in
> question, causing it to reload configuration, but in some cases the
> init script's actions are identical to what would happen with the
> "restart" target.

[..]
>   reload
> 
>   cause the configuration of the service to be reloaded without
>   actually stopping and restarting the service,
[..]
> my take on this is that, while optional, the reload target must not
> stop and start a service if implemented in an init script.  it would
> then logically follow that reload must not start a service which is
> not running.
> 
> is my interpretation of this correct, or am i over-analyzing things?

I agree with your interpretation... and believe that most init.d scripts
behave this way.

Hamish
-- 
Hamish Moffatt VK3SB <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]