diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-31 13:30:50 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-09-05 00:28:29 +0300 |
commit | d3f78932cf6b3063caceacdae9ddd6ca30d48786 (patch) | |
tree | 765de745d26798d7a37340d2851b86b57cda7eb8 /meta-openpower/recipes-phosphor/occ/openpower-occ-control/occ-active.sh | |
parent | f1ade61b5994799a4cffca0c124b2ed36e640cbf (diff) | |
download | openbmc-d3f78932cf6b3063caceacdae9ddd6ca30d48786.tar.xz |
meta-openpower: Move layer content from common/
Adopt a more conventional directory hierarchy. meta-openpower is still
a _long_ way from suitable for hosting on yoctoproject.org but things
like this don't help.
(From meta-openpower rev: 2c8db5661cecd7e4cc20bcb96df76490e62cfb67)
Change-Id: I415caaa28ec728f24e755ddb549012f24874fefe
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openpower/recipes-phosphor/occ/openpower-occ-control/occ-active.sh')
-rwxr-xr-x | meta-openpower/recipes-phosphor/occ/openpower-occ-control/occ-active.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/meta-openpower/recipes-phosphor/occ/openpower-occ-control/occ-active.sh b/meta-openpower/recipes-phosphor/occ/openpower-occ-control/occ-active.sh new file mode 100755 index 000000000..a6097e527 --- /dev/null +++ b/meta-openpower/recipes-phosphor/occ/openpower-occ-control/occ-active.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# set and unset occ active for all occ's in system + +if [ "$1" == "disable" ]; then + value='false' +elif [ "$1" == "enable" ]; then + value='true' +else + echo "Usage: occ-active.sh [argument]" + echo " enable - set occ's to active state" + echo " disable - set occ's to inactive state" + exit -1 +fi + +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 |