replace "opts=" in various init.d scripts
Various init.d scripts gives:
* Use of the opts variable is deprecated and will be
* removed in the future.
* Please use extra_commands, extra_started_commands or extra_stopped_commands.
For example, sshd has
opts="${opts} reload checkconfig gen_keys"
This means that you can run /etc/init.d/sshd reload, /etc/init.d/sshd checkconfig or /etc/init.d/sshd gen_keys in addition to the normal start/stop commands.
Those needs to be replaced with the extra_commands* variables.
extra_started_commands: means that the service must have been started
before we can run those extra commands.
extra_stopped_commands: means that the service must not run to be able
to runn the extra commands.
extra_commands: the command can always be run
So to fix sshd in our example, we replace
opts="${opts} reload checkconfig gen_keys"
With:
extra_started_commands="reload"
extra_stopped_commands="gen_keys"
extra_commands="checkconfig"
This means that you cannot do /etc/init.d/sshd reload unless sshd is actually running, that you cannot do /etc/init.d/sshd gen_keys unless sshd is stopped and that you can run checkconfig regardless the sshd state.
It might be worth check if the corresponding Gentoo script have it fixed already.
(from redmine: issue id 898, created on 2012-01-06, closed on 2012-05-07)
- Relations:
- child #939 (closed)
- child #940 (closed)
- child #941 (closed)
- child #942 (closed)
- child #943 (closed)
- child #944 (closed)
- child #945 (closed)
- child #946 (closed)
- child #947 (closed)
- child #948 (closed)
- child #949 (closed)
- child #950 (closed)
- Changesets:
- Revision 41329347 by Cameron Banta on 2012-01-19T21:30:37Z:
main/nginx: update to 1.0.11 and replace "opts=" in init.d script
ref #946
ref #898
- Revision 5bedeb37 by Cameron Banta on 2012-01-23T07:22:18Z:
testing/rsyslog: update to 5.8.7 and replace "opts=" in init.d script
ref #946
ref #898
- Revision 659ef779 by Francesco Colista on 2019-03-04T16:20:30Z:
testing/hylafaxplus: upgrade to 5.6.1. Fixes #898