[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to make systemd execute init.d script status statements?



Looking a bit further up in debug output, I see this:

+ . /lib/lsb/init-functions
+++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)'
++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']'
++ . /lib/lsb/init-functions.d/20-left-info-blocks
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)'
++ '[' -r /lib/lsb/init-functions.d/40-systemd ']'
++ . /lib/lsb/init-functions.d/40-systemd
+++ _use_systemctl=0
+++ '[' -d /run/systemd/system ']'
+++ '[' -n '' ']'
+++ '[' 20132 -ne 1 ']'
+++ '[' -z '' ']'
+++ '[' -z '' ']'
+++ case $(readlink -f "$0") in
++++ readlink -f /etc/init.d/sip-proxy
+++ _use_systemctl=1
+++ prog=sip-proxy
+++ service=sip-proxy.service
++++ systemctl -p CanReload show sip-proxy.service
+++ '[' CanReload=no = CanReload=no ']'
+++ '[' status = reload ']'
+++ '[' 1 = 1 ']'
+++ set +e
+++ set +u
+++ '[' xstatus = xstart -o xstatus = xstop -o xstatus = xrestart -o xstatus = xreload -o xstatus = xforce-reload -o xstatus = xstatus ']'
+++ systemctl_redirect /etc/init.d/sip-proxy status

I guess this systemctl_redirect command does the highjacking perhaps
because of _use_systemctl=1.

-- Juha



Reply to: