Re: RFC: initscript policy proposal
On Fri 03 Nov 2000, Henrique M Holschuh wrote:
> Proposed script interfaces (to be rewritten as manpages):
>
> invoke-rc.d [options] <basename> <action>
> *) case ${state} in
> I) INITSCRIPTID=$i
> ;;
> II) ACTION=$i
> ;;
> *) printerror syntax error: extra parameter \"$i\"
> exit 103
> ;;
Nowhere in policy do I see that it is forbidden to pass extra
parameters. However, your invoke-rc.d does in fact explicitly
forbid it (it prints an error and exits with 103).
I can think of a situation where a package may have more than
one daemon, and upon upgrading only one of those daemon must
be restarted. Calling the init.d script with the parameters
"restart daemonname" might be a very useful solution, one that
is not possible with your current scheme.
> ## sanity checks and just-in-case warnings.
> case ${ACTION} in
> start|stop|force-stop|restart|restart-if-running|reload|force-reload|status)
> ;;
> *)
> printerror action ${ACTION} is unknown, but proceeding anyway.
> ;;
> esac
Here you test for unknown actions, and continue anyway. Not very
consistent with the exit 103 above?
Paul Slootman
--
home: paul@wurtel.demon.nl http://www.wurtel.demon.nl/
work: paul@murphy.nl http://www.murphy.nl/
debian: paul@debian.org http://www.debian.org/
isdn4linux: paul@isdn4linux.org http://www.isdn4linux.org/
Reply to: