Ian Jackson <[EMAIL PROTECTED]> writes: > Bdale: > > I would like to propose that all scripts placed in /etc/init.d should > > be required to support at least the four arguments > > 'start|stop|reload|restart'. In cases where there is currently no > > 'restart', it could easily be formed as the sequence of actions to > > perform a stop followed by a start. In cases where there is no > > 'reload' and the daemon(s) in question can't do on-the-fly reloading > > of config files, the 'reload' token would degenerate to an alias for > > 'restart'. > > I agree, FWIW. Does anyone have any counterarguments ?
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. For example, the AppleShare server 'afpd' does not to my knowledge support the 'reload' operation. If I type '/etc/init.d/netatalk reload', I'd like to be sure that netatalk won't try to "help" me by kicking all the connected users off the AppleShare servers and restarting them. 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.