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/flash/openpower-software-manager/obmc-flash-bios-squashfsmount@.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-squashfsmount@.service
index 9109532..96c1eb6 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-squashfsmount@.service
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-squashfsmount@.service
@@ -6,4 +6,5 @@
 [Service]
 Type=oneshot
 RemainAfterExit=no
-ExecStart={sbindir}/obmc-flash-bios squashfsmount pnor-ro-%i %i
+ExecStart=/usr/bin/env obmc-flash-bios squashfsmount pnor-ro-%i %i
+SyslogIdentifier=obmc-flash-bios
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service
index bae633d..d0785c9 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service
@@ -4,4 +4,5 @@
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart={sbindir}/obmc-flash-bios ubiattach
+ExecStart=/usr/bin/env obmc-flash-bios ubiattach
+SyslogIdentifier=obmc-flash-bios
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service
index ee63282..b4bd2d7 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service
@@ -6,5 +6,6 @@
 [Service]
 Type=oneshot
 RemainAfterExit=no
-ExecStart={sbindir}/obmc-flash-bios ubimount pnor-rw-%i
-ExecStart={sbindir}/obmc-flash-bios ubimount pnor-prsv
+ExecStart=/usr/bin/env obmc-flash-bios ubimount pnor-rw-%i
+ExecStart=/usr/bin/env obmc-flash-bios ubimount pnor-prsv
+SyslogIdentifier=obmc-flash-bios
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service
index c280193..8afc327 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service
@@ -6,4 +6,5 @@
 [Service]
 Type=oneshot
 RemainAfterExit=no
-ExecStart={sbindir}/obmc-flash-bios ubimount pnor-patch
+ExecStart=/usr/bin/env obmc-flash-bios ubimount pnor-patch
+SyslogIdentifier=obmc-flash-bios
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiremount.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiremount.service
index 0b5a077..f52cac6 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiremount.service
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiremount.service
@@ -6,7 +6,8 @@
 [Service]
 Type=oneshot
 RemainAfterExit=no
-ExecStart={sbindir}/obmc-flash-bios ubiremount
+ExecStart=/usr/bin/env obmc-flash-bios ubiremount
+SyslogIdentifier=obmc-flash-bios
 
 [Install]
 WantedBy=multi-user.target
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-prsv.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-prsv.service
index 463714c..1c3939e 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-prsv.service
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-prsv.service
@@ -6,4 +6,5 @@
 [Service]
 Type=oneshot
 RemainAfterExit=no
-ExecStart={sbindir}/obmc-flash-bios ubiumount pnor-prsv
+ExecStart=/usr/bin/env obmc-flash-bios ubiumount pnor-prsv
+SyslogIdentifier=obmc-flash-bios
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-ro@.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-ro@.service
index acf1931..c6dc553 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-ro@.service
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-ro@.service
@@ -6,4 +6,5 @@
 [Service]
 Type=oneshot
 RemainAfterExit=no
-ExecStart={sbindir}/obmc-flash-bios ubiumount pnor-ro-%i
+ExecStart=/usr/bin/env obmc-flash-bios ubiumount pnor-ro-%i
+SyslogIdentifier=obmc-flash-bios
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service
index 84fd523..c0ea8e6 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service
@@ -6,4 +6,5 @@
 [Service]
 Type=oneshot
 RemainAfterExit=no
-ExecStart={sbindir}/obmc-flash-bios ubiumount pnor-rw-%i
+ExecStart=/usr/bin/env obmc-flash-bios ubiumount pnor-rw-%i
+SyslogIdentifier=obmc-flash-bios
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service
index c0a2bbb..49e495e 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service
@@ -6,7 +6,8 @@
 [Service]
 Type=oneshot
 RemainAfterExit=no
-ExecStart={sbindir}/obmc-flash-bios updatesymlinks
+ExecStart=/usr/bin/env obmc-flash-bios updatesymlinks
+SyslogIdentifier=obmc-flash-bios
 
 [Install]
 WantedBy=mboxd.service mboxd-reload@.service
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service b/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service
index 13bc5b7..d7ccaae 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service
+++ b/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service
@@ -7,7 +7,8 @@
 Before=obmc-flash-bios-ubipatch.service
 
 [Service]
-ExecStart={sbindir}/openpower-update-manager
+ExecStart=/usr/bin/env openpower-update-manager
+SyslogIdentifier=openpower-update-manager
 Restart=always
 Type=dbus
 BusName={BUSNAME}