[Pkg-sysvinit-devel] Bug#782993: service/invoke-rc.d: "force-reload" wrongly mapped to "systemctl restart"
Michael Biebl
biebl at debian.org
Mon Apr 20 13:07:01 UTC 2015
Am 20.04.2015 um 11:13 schrieb Ansgar Burchardt:
> Package: sysvinit-utils
> Version: 2.88dsf-59
> Severity: normal
> File: /usr/sbin/service
>
> service uses the following logic:
>
> +----
> | force-reload)
> | _canreload="$(systemctl -p CanReload show ${UNIT} 2>/dev/null)"
> | if [ "$_canreload" = "CanReload=no" ]; then
> | exec systemctl restart "${UNIT}"
> | else
> | exec systemctl reload "${UNIT}"
> | fi
> | ;;
> +---[ /usr/sbin/service ]
>
> This maps "service atd force-reload" to "systemctl restart atd" which
> *starts* atd if it is not already running. However LSB says:
>
> +---
> | force-reload: cause the configuration to be reloaded if the
> | service supports this, otherwise restart the service if it is
> | running
> +---[ http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html ]
>
> Though Debian's policy isn't quite so clear:
>
> +---
> | force-reload: cause the configuration to be reloaded if the
> | service supports this, otherwise restart the service.
> +---[ https://www.debian.org/doc/debian-policy/ch-opersys.html#s-writing-init ]
>
> I assume the intent is the same. Note that the systemd integration
> already maps "/etc/init.d/X force-reload" to "systemctl force-reload
> X" which is equivalent to "systemctl reload-or-try-restart X" (which
> does nothing if X is not already running).
>
> invoke-rc.d duplicates the same logic...
Shouldn't we get clarification on the policy in that case then?
The skeleton sysv init script for as long as I know mapped
reload|force-reload) (if daemon support reload) or
restart|force-reload) (if daemon doesn't support reload).
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20150420/030e7696/attachment.sig>
More information about the Pkg-sysvinit-devel
mailing list