blob: c005c7dd8ace50f2409e9c1e5f01687a2f46361c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/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"
# Rescan bus to find OCCs
openpower-proc-control scanFSI
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
|