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

Re: inconsistent init.d arguments

On Mon, 17 Nov 1997, Bdale Garbee wrote:

> I've been really annoyed lately on my laptop with my seeming inability
> to guess at the options to scripts in /etc/init.d.  Specifically, some
> of the scripts use 'reload', some use 'restart'.
> The majority that provide a reload or a restart use 'reload'.  I find
> this non-intuitive, since we use 'start' and not 'load' for the normal
> startup.

'reload' means 'reload configuration', whereas 'restart' means 'stop
followed by start'.

reload is much more common because well-written daemons don't need to be
restarted, they just need to be told to reload their config.

> I looked briefly, but didn't find this mentioned in the policy
> documents I have.  What's the right answer?  I'd like to file a set of
> bug reports to achieve consistency, but thought I'd solicit comments
> here first.  Frankly, I'd like all the scripts to handle either
> 'reload' or 'restart'.  This shouldn't be a significant burden.
> Thoughts?

this is how i wrote the latest init.d script for timeoutd:

case "$1" in
    start-stop-daemon --start --verbose --exec $DAEMON
    start-stop-daemon --stop --verbose --exec $DAEMON
    start-stop-daemon --stop --signal 1 --verbose --exec $DAEMON
    start-stop-daemon --stop --verbose --exec $DAEMON
    start-stop-daemon --start --verbose --exec $DAEMON
    echo "Usage: /etc/init.d/timeoutd {start|stop|reload|restart}"
    exit 1

IMO in scripts which make no useful distinction between reload and
restart, they should be made synonyms of each other....then all scripts
will be guarranteed to handle both arguments correctly.


craig sanders
networking consultant                  Available for casual or contract
temporary autonomous zone              system administration tasks.

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: