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

Re: proposed minimum function of /etc/init.d scripts

Klee points out:
> I definitely agree regarding 'start|stop|restart'.  However, I believe
> that 'reload' should take action only if properly supported by the
> system in question.  When I use the 'reload' argument, it's for the
> specific purpose of making the system reload it's configuration files
> without interrupting service --- if it's not available, I don't
> necessarily want the system to go ahead and restart the process
> anyway.

Good point.

> If I don't mind the process being killed and restarted, I can always
> habitually type '/etc/init.d/<script> restart' and avoid the issue
> entirely.
> Scripts that want to be clever about restarting systems should use
> '/etc/init.d/<script> reload || /etc/init.d/<script> restart'.  This
> makes script-writing slightly more complicated, but I'd argue that
> this will be a much less common case than the interactive usages.

However, I think that this functionality could better be put in the
init.d script - adding an additional argument possibility for an
existing case is easy, and the script itself knows whether it can
support reloading with or without disrupting service.

This means splitting `reload' into two arguments, which in a script
that can do it without disrupting service do the same thing, and which
in other packages either do `restart' or fail.

I can't think of any very good names for these at the moment, apart
from using adverbs (eg `mustreload' or `mayreload').


Reply to: