Enable BMC patching from the /usr/local path
This commit enables patches from the /usr/local path by replacing
absolute paths to /usr/sbin or /usr/bin in every service file with
"/usr/bin/env ". Additionally, SyslogIdentifier is added to each
file to ensure that journal entries are still distinct.
In two cases, service files also had to change due to references
to ${{PATH}}, which doesn't work with /usr/bin/env. These
references - and the corresponding definitions - were changed to
${{DEVPATH}}.
Resolves openbmc/openbmc#2149
Change-Id: I12c5c6e5101eef6820b985a563313836250ff2c7
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
diff --git a/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service b/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service
index 2e13cfa..fd9b539 100644
--- a/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service
+++ b/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service
@@ -6,6 +6,7 @@
[Service]
Restart=always
-ExecStart={sbindir}/phosphor-gevent $APPLICATION
+ExecStart=/usr/bin/env phosphor-gevent $APPLICATION
+SyslogIdentifier=phosphor-gevent
Environment="PYTHONUNBUFFERED=1"
EnvironmentFile={envfiledir}/obmc/wsgi_app
diff --git a/common/recipes-phosphor/interfaces/phosphor-rocket/phosphor-rocket.service b/common/recipes-phosphor/interfaces/phosphor-rocket/phosphor-rocket.service
index 41eaf8b..cfd4b6e 100644
--- a/common/recipes-phosphor/interfaces/phosphor-rocket/phosphor-rocket.service
+++ b/common/recipes-phosphor/interfaces/phosphor-rocket/phosphor-rocket.service
@@ -5,7 +5,8 @@
[Service]
Restart=always
-ExecStart={sbindir}/phosphor-rocket $APPLICATION
+ExecStart=/usr/bin/env phosphor-rocket $APPLICATION
+SyslogIdentifier=phosphor-rocket
Environment="PYTHONUNBUFFERED=1"
EnvironmentFile={envfiledir}/obmc/wsgi_app
diff --git a/common/recipes-phosphor/interfaces/rest-dbus/rest-dbus.service b/common/recipes-phosphor/interfaces/rest-dbus/rest-dbus.service
index fbc8004..9afd0c4 100644
--- a/common/recipes-phosphor/interfaces/rest-dbus/rest-dbus.service
+++ b/common/recipes-phosphor/interfaces/rest-dbus/rest-dbus.service
@@ -3,5 +3,6 @@
[Service]
Restart=always
-ExecStart={sbindir}/rest-dbus
+ExecStart=/usr/bin/env rest-dbus
+SyslogIdentifier=rest-dbus
Environment="PYTHONUNBUFFERED=1"
diff --git a/common/recipes-phosphor/interfaces/slpd-lite/slpd-lite.service b/common/recipes-phosphor/interfaces/slpd-lite/slpd-lite.service
index 02d593c..5d58709 100644
--- a/common/recipes-phosphor/interfaces/slpd-lite/slpd-lite.service
+++ b/common/recipes-phosphor/interfaces/slpd-lite/slpd-lite.service
@@ -4,7 +4,8 @@
After=network.target
[Service]
-ExecStart={sbindir}/slpd
+ExecStart=/usr/bin/env slpd
+SyslogIdentifier=slpd
Restart=always
[Install]