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

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



Ian Jackson <ian@chiark.greenend.org.uk> writes:

> Klee points out:
> > 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').

The command which reloads or fails should continue to be called
reload.  The one which does or a reload or restart can be called
something else, though I'm also at a loss for a suggestion.


Guy


Reply to: