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

init scripts and the "reload" target



heyo,

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.

as a result, there is an interesting variety of results observed
when the service in question is not running.  sometimes reload will
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).

so sayeth policy 9.3.2:

	restart

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

	reload

	    cause the configuration of the service to be reloaded without
	    actually stopping and restarting the service,

	force-reload

	    cause the configuration to be reloaded if the service supports
	    this, otherwise restart the service.

	The start, stop, restart, and force-reload options should be
	supported by all scripts in /etc/init.d, the reload option
	is optional.

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?


thanks,
	sean

-- 

Attachment: signature.asc
Description: Digital signature


Reply to: