service command does not start legacy SysV scripts if systemd is enabled

Bug #1595759 reported by Sarah Newman on 2016-06-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
init-system-helpers (Ubuntu)
Undecided
Unassigned

Bug Description

Version: 1.29ubuntu1 on Xenial 16.04

We have a legacy sysv init script. The command 'service' doesn't operate on it without the following patch applied:

$ diff -uNr /usr/sbin/service /usr/local/sbin/service
--- /usr/sbin/service 2016-02-29 12:24:38.000000000 +0000
+++ /usr/local/sbin/service 2016-06-24 00:08:56.651503942 +0000
@@ -179,6 +179,11 @@
    fi
 }

+if [ -f "$SERVICEDIR/$SERVICE" ] && systemctl list-unit-files ${SERVICE} | grep -q '0 unit files listed.' ; then
+ update_openrc_started_symlinks
+ run_via_sysvinit
+fi
+
 # When this machine is running systemd, standard service calls are turned into
 # systemctl calls.
 if [ -n "$is_systemd" ]

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers