blob: a6097e52708a75623ca078ca6ca4e5aae48222d6 [file] [log] [blame]
Andrew Geisslereef81012017-08-15 14:04:51 -05001#!/bin/sh
2# set and unset occ active for all occ's in system
3
4if [ "$1" == "disable" ]; then
5 value='false'
6elif [ "$1" == "enable" ]; then
7 value='true'
8else
9 echo "Usage: occ-active.sh [argument]"
10 echo " enable - set occ's to active state"
11 echo " disable - set occ's to inactive state"
12 exit -1
13fi
Andrew Geissler63f5d722017-08-21 15:56:41 -050014
15OCC_CONTROL_SERVICE="org.open_power.OCC.Control"
16
17busctl tree $OCC_CONTROL_SERVICE --list | grep occ | xargs -r -n1 -I{} \
18 busctl set-property $OCC_CONTROL_SERVICE {} org.open_power.OCC.Status \
19 OccActive b $value
Andrew Geisslereef81012017-08-15 14:04:51 -050020exit 0