On Mon, 2015-01-19 at 21:05 +0100, Yamaban wrote:
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.
try-reload? I don't think that was ever specified as a default on sysv scripts (there was reload and force-reload)
Would the following do the job?
[code] systemctl --quiet is-active apparmor && systemctl reload apparmor [/code]
why the check? systemctl reload is not supposed to start the service if it's not running (equivalent to sysv times: it is not supposed to start the service if not running) (not to confuse with reload-or-restart: this WILL trigger a reload if possible or a 'restart', which is a 'stop and start' => resulting in a running service in the end) Cheers, Dominique -- Dimstar / Dominique Leuenberger <dimstar@opensuse.org> -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org