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/leds/phosphor-led-manager/obmc-fru-fault-monitor.service b/common/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service
index ab83622..4810a7e 100644
--- a/common/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service
+++ b/common/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service
@@ -5,7 +5,8 @@
[Service]
Restart=always
-ExecStart={sbindir}/phosphor-fru-fault-monitor
+ExecStart=/usr/bin/env phosphor-fru-fault-monitor
+SyslogIdentifier=phosphor-fru-fault-monitor
[Install]
WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service b/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service
index 36a4430..38d6c5a 100644
--- a/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service
+++ b/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service
@@ -8,4 +8,5 @@
Type=oneshot
RemainAfterExit=yes
Restart=no
-ExecStart={sbindir}/mapper call /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b true
+ExecStart=/usr/bin/env mapper call /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b true
+SyslogIdentifier=mapper
diff --git a/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service b/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service
index e7799f3..93db03e 100644
--- a/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service
+++ b/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service
@@ -8,4 +8,5 @@
Type=oneshot
RemainAfterExit=yes
Restart=no
-ExecStart={sbindir}/mapper call /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b false
+ExecStart=/usr/bin/env mapper call /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b false
+SyslogIdentifier=mapper
diff --git a/common/recipes-phosphor/leds/phosphor-led-manager/xyz.openbmc_project.LED.GroupManager.service b/common/recipes-phosphor/leds/phosphor-led-manager/xyz.openbmc_project.LED.GroupManager.service
index a5ada69..2f9a25e 100644
--- a/common/recipes-phosphor/leds/phosphor-led-manager/xyz.openbmc_project.LED.GroupManager.service
+++ b/common/recipes-phosphor/leds/phosphor-led-manager/xyz.openbmc_project.LED.GroupManager.service
@@ -4,7 +4,8 @@
[Service]
Restart=always
-ExecStart={sbindir}/phosphor-ledmanager
+ExecStart=/usr/bin/env phosphor-ledmanager
+SyslogIdentifier=phosphor-ledmanager
Type=dbus
BusName={BUSNAME}
diff --git a/common/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service b/common/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service
index a475bd0..c673cda 100644
--- a/common/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service
+++ b/common/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service
@@ -3,4 +3,5 @@
[Service]
Restart=always
-ExecStart={sbindir}/phosphor-ledcontroller -p %f
+ExecStart=/usr/bin/env phosphor-ledcontroller -p %f
+SyslogIdentifier=phosphor-ledcontroller