On Mon, 19 Jan 2015 19:30, Dimstar / Dominique Leuenberger <dimstar@...> wrote:
On Mon, 2015-01-19 at 21:16 +0300, Andrei Borzenkov wrote:
Seriously: I can think of an easy and obvious solution - the wrapper should just hand over the parameter it gets to the initscript without any modification. This means: systemctl foo restart -> /etc/init.d/foo restart
systemd does not have notion of "restart" as first class citizen. It implements "restart" as "stop" followed by "start".
instead of the current, broken behaviour
According to LSB, 'service restart' on (sysV services!) was already declared long ago as 'stop and restart if the service is running, otherwise only start'
See http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/in... for a definition.
As such, there is nothing systemd invented here: it actually only implemented what LSB already defined long ago.
(I know it does not help the fact that apparmor still needs it - but the correct flag in sysv times would have been 'reload': have the service reload its configuration)
Cheers, Dominique
Addenum:
From specfile scripts apparmor should be called with try-reload, but systemd does not know that command.
Would the following do the job? [code] systemctl --quiet is-active apparmor && systemctl reload apparmor [/code] But then we should make sure that the actual apparmor.service file contains the needed "ExecReload=" line else it's pre-defined as SIGHUP to the process pid - Yamaban. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org