summaryrefslogtreecommitdiff
path: root/meta-phosphor/common/recipes-phosphor/chassis
diff options
context:
space:
mode:
authorMichael Tritz <mtritz@us.ibm.com>2017-08-15 22:07:23 +0300
committerPatrick Williams <patrick@stwcx.xyz>2017-08-25 00:14:19 +0300
commit0ad3b1df9079064491c8318bece22e63cc71b2f4 (patch)
treea7321a843e14fadb541f92aa965740e02015ebdd /meta-phosphor/common/recipes-phosphor/chassis
parent0c75c0b0f709aaa9e56033c19daf8d074c7aeb6d (diff)
downloadopenbmc-0ad3b1df9079064491c8318bece22e63cc71b2f4.tar.xz
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>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/chassis')
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/files/obmc-phosphor-chassisd.service3
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-button-power/org.openbmc.buttons.Power@.service3
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-button-reset/org.openbmc.buttons.reset@.service3
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-control-chassis/org.openbmc.control.Chassis@.service3
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-mgr-inventory/obmc-sync-inventory-item@.service3
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-mgr-inventory/org.openbmc.Inventory.service3
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service3
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service3
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service3
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service3
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/org.openbmc.control.Power@.service3
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-pcie-detect/pcie-slot-detect@.service3
12 files changed, 24 insertions, 12 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/files/obmc-phosphor-chassisd.service b/meta-phosphor/common/recipes-phosphor/chassis/files/obmc-phosphor-chassisd.service
index e343bdfb8..e981dc06d 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/files/obmc-phosphor-chassisd.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/files/obmc-phosphor-chassisd.service
@@ -3,7 +3,8 @@ Description=Phosphor Chassis Controller
[Service]
Restart=always
-ExecStart={sbindir}/obmc-phosphor-chassisd
+ExecStart=/usr/bin/env obmc-phosphor-chassisd
+SyslogIdentifier=obmc-phosphor-chassisd
[Install]
WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-button-power/org.openbmc.buttons.Power@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-button-power/org.openbmc.buttons.Power@.service
index 2eb36d66d..443ecbbab 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-button-power/org.openbmc.buttons.Power@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-button-power/org.openbmc.buttons.Power@.service
@@ -5,7 +5,8 @@ After=mapper-wait@-org-openbmc-managers-System.service
[Service]
Restart=always
-ExecStart={sbindir}/button_power.exe
+ExecStart=/usr/bin/env button_power.exe
+SyslogIdentifier=button_power.exe
Type=dbus
BusName={BUSNAME}
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-button-reset/org.openbmc.buttons.reset@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-button-reset/org.openbmc.buttons.reset@.service
index 5b060e470..e535e650c 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-button-reset/org.openbmc.buttons.reset@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-button-reset/org.openbmc.buttons.reset@.service
@@ -5,7 +5,8 @@ After=mapper-wait@-org-openbmc-managers-System.service
[Service]
Restart=always
-ExecStart={sbindir}/button_reset.exe
+ExecStart=/usr/bin/env button_reset.exe
+SyslogIdentifier=button_reset.exe
Type=dbus
BusName={BUSNAME}
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-control-chassis/org.openbmc.control.Chassis@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-control-chassis/org.openbmc.control.Chassis@.service
index 1620fe14f..f57e9d849 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-control-chassis/org.openbmc.control.Chassis@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-control-chassis/org.openbmc.control.Chassis@.service
@@ -3,7 +3,8 @@ Description=Phosphor Chassis%i Control
[Service]
Restart=always
-ExecStart={sbindir}/chassis_control.py
+ExecStart=/usr/bin/env chassis_control.py
+SyslogIdentifier=chassis_control.py
Type=dbus
BusName={BUSNAME}
Environment="PYTHONUNBUFFERED=1"
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-mgr-inventory/obmc-sync-inventory-item@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-mgr-inventory/obmc-sync-inventory-item@.service
index 33b1166c0..ba3af0557 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-mgr-inventory/obmc-sync-inventory-item@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-mgr-inventory/obmc-sync-inventory-item@.service
@@ -7,7 +7,8 @@ After=obmc-read-eeprom@%i.service
Restart=no
Type=oneshot
EnvironmentFile={envfiledir}/obmc/sync_inventory_item/%I
-ExecStart={sbindir}/sync_inventory_items.py -t $FRU_TYPE -n $FRU_NAME -p ${{PROPERTY}} -s $SYNC_TYPE
+ExecStart=/usr/bin/env sync_inventory_items.py -t $FRU_TYPE -n $FRU_NAME -p ${{PROPERTY}} -s $SYNC_TYPE
+SyslogIdentifier=sync_inventory_items.py
[Install]
WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-mgr-inventory/org.openbmc.Inventory.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-mgr-inventory/org.openbmc.Inventory.service
index 0f835a618..4a9232b84 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-mgr-inventory/org.openbmc.Inventory.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-mgr-inventory/org.openbmc.Inventory.service
@@ -3,7 +3,8 @@ Description=Phosphor Inventory Manager
[Service]
Restart=always
-ExecStart={sbindir}/inventory_items.py
+ExecStart=/usr/bin/env inventory_items.py
+SyslogIdentifier=inventory_items.py
Type=dbus
BusName={BUSNAME}
Environment="PYTHONUNBUFFERED=1"
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service
index befc89296..dc3174db3 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service
@@ -12,7 +12,8 @@ ConditionPathExists=!/run/openbmc/chassis@%i-on
[Service]
RemainAfterExit=yes
Type=oneshot
-ExecStart={sbindir}/mapper call /org/openbmc/control/power%i org.openbmc.control.Power setPowerState i 1
+ExecStart=/usr/bin/env mapper call /org/openbmc/control/power%i org.openbmc.control.Power setPowerState i 1
+SyslogIdentifier=mapper
[Install]
WantedBy=obmc-host-start@%i.target
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service
index 0833afb47..1321c215e 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service
@@ -10,7 +10,8 @@ Conflicts=obmc-chassis-poweron@%i.target
[Service]
RemainAfterExit=yes
-ExecStart={sbindir}/mapper call /org/openbmc/control/power%i org.openbmc.control.Power setPowerState i 0
+ExecStart=/usr/bin/env mapper call /org/openbmc/control/power%i org.openbmc.control.Power setPowerState i 0
+SyslogIdentifier=mapper
[Install]
WantedBy=obmc-host-stop@%i.target
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service
index 9696b1afa..11373618b 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service
@@ -12,7 +12,8 @@ Conflicts=obmc-chassis-poweron@%i.target
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart={sbindir}/pgood_wait /org/openbmc/control/power%i off
+ExecStart=/usr/bin/env pgood_wait /org/openbmc/control/power%i off
+SyslogIdentifier=pgood_wait
ExecStart=/bin/rm -f /run/openbmc/chassis@%i-on
ExecStart=/bin/rm -f /run/openbmc/host@%i-on
ExecStart=/bin/rm -f /run/openbmc/host@%i-request
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service
index cd4f513a0..1e65d0887 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service
@@ -11,7 +11,8 @@ ConditionPathExists=!/run/openbmc/chassis@%i-on
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart={sbindir}/pgood_wait /org/openbmc/control/power%i on
+ExecStart=/usr/bin/env pgood_wait /org/openbmc/control/power%i on
+SyslogIdentifier=pgood_wait
TimeoutSec=30
[Install]
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/org.openbmc.control.Power@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/org.openbmc.control.Power@.service
index 4b981830c..95ef0b88d 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/org.openbmc.control.Power@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/org.openbmc.control.Power@.service
@@ -6,7 +6,8 @@ After=mapper-wait@-org-openbmc-managers-System.service
[Service]
EnvironmentFile={envfiledir}/obmc/power_control
Restart=always
-ExecStart={sbindir}/power_control.exe $POLL_INTERVAL $PGOOD_TIMEOUT
+ExecStart=/usr/bin/env power_control.exe $POLL_INTERVAL $PGOOD_TIMEOUT
+SyslogIdentifier=power_control.exe
Type=dbus
BusName={BUSNAME}
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-pcie-detect/pcie-slot-detect@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-pcie-detect/pcie-slot-detect@.service
index 6cc65f892..91adb769b 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-pcie-detect/pcie-slot-detect@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-pcie-detect/pcie-slot-detect@.service
@@ -7,7 +7,8 @@ Conflicts=obmc-host-stop@%i.target
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart={sbindir}/pcie_slot_present.exe
+ExecStart=/usr/bin/env pcie_slot_present.exe
+SyslogIdentifier=pcie_slot_present.exe
[Install]
WantedBy=obmc-host-start@%i.target