commit | 5c4e7daceba71835029498d295e28f489bd05591 | [log] [tgz] |
---|---|---|
author | Andrew Geissler <andrewg@us.ibm.com> | Mon Aug 21 15:56:41 2017 -0500 |
committer | Patrick Williams <patrick@stwcx.xyz> | Mon Aug 28 20:07:49 2017 +0000 |
tree | a2b6a59acee89b08188a9047236e199587d9b93c | |
parent | 17fe3016925da08cd62b13d77bd32dc2808a7488 [diff] |
occ-active:Exit gracefully if occ status object not available Resolves openbmc/openbmc#2189 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com> Change-Id: I57244e14029c4cfed716208a624b79a83e9e2c83
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh index 0d4857c..a6097e5 100755 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh
@@ -11,7 +11,10 @@ echo " disable - set occ's to inactive state" exit -1 fi -busctl tree org.open_power.OCC.Control --list | grep occ | xargs -n1 -I{} \ - busctl set-property org.open_power.OCC.Control {} \ - org.open_power.OCC.Status OccActive b $value + +OCC_CONTROL_SERVICE="org.open_power.OCC.Control" + +busctl tree $OCC_CONTROL_SERVICE --list | grep occ | xargs -r -n1 -I{} \ + busctl set-property $OCC_CONTROL_SERVICE {} org.open_power.OCC.Status \ + OccActive b $value exit 0