blob: 0d4857c11f4c6d00ba67866add72d81c0c301a54 [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
14busctl tree org.open_power.OCC.Control --list | grep occ | xargs -n1 -I{} \
15 busctl set-property org.open_power.OCC.Control {} \
16 org.open_power.OCC.Status OccActive b $value
17exit 0