Skip to content

Commit 9339097

Browse files
committed
meta-quanta: meta-gbs: Fix gbs-set-failsafe.sh
The busctl tree and grep used to get the number of zones is too wide and the tree returns fans and sensors within the zone: ~# busctl tree xyz.openbmc_project.State.FanCtrl `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/settings `- /xyz/openbmc_project/settings/fanctrl |- /xyz/openbmc_project/settings/fanctrl/zone0 | |- /xyz/openbmc_project/settings/fanctrl/zone0/cputemp ... ... `- /xyz/openbmc_project/settings/fanctrl/zone1 |- /xyz/openbmc_project/settings/fanctrl/zone1/nvme0 ... ... Which means running the grep gives more than the 2 zones that were meant to be gotten resulting in trying to set the failsafe for many more zones: Jul 11 11:49:08 busctl[9642]: Failed to set property Target on interface xyz.openbmc_project.Control.FanSpeed: Unknown object '/xyz/openbmc_project/settings/fanctrl/zone4'. Jul 11 11:49:09 busctl[9693]: Failed to set property Target on interface xyz.openbmc_project.Control.FanSpeed: Unknown object '/xyz/openbmc_project/settings/fanctrl/zone4'. Jul 11 11:49:10 busctl[9744]: Failed to set property Target on interface xyz.openbmc_project.Control.FanSpeed: Unknown object '/xyz/openbmc_project/settings/fanctrl/zone4'. Jul 11 11:49:11 busctl[9767]: Failed to set property Target on interface xyz.openbmc_project.Control.FanSpeed: Unknown object '/xyz/openbmc_project/settings/fanctrl/zone4'. Jul 11 11:49:12 gbs-set-failsafe.sh[8710]: Failure setting zone4 fan failsafe to 255 ... ... Tested: With the change, the grep correctly gives "2" as the number of zones: ~# busctl tree xyz.openbmc_project.State.FanCtrl | grep -c -E 'zone[0-9]$' 2 Signed-off-by: Brandon Kim <[email protected]> Change-Id: I1efd09b8d99ec00027489a05b647b43b1186c038
1 parent 5048d53 commit 9339097

File tree

1 file changed

+1
-1
lines changed
  • meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon

1 file changed

+1
-1
lines changed

meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-set-failsafe.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if [ -z "$target_pwm" ]; then
2222
exit 1
2323
fi
2424

25-
zone_num="$(busctl tree xyz.openbmc_project.State.FanCtrl | grep -c zone)"
25+
zone_num="$(busctl tree xyz.openbmc_project.State.FanCtrl | grep -c -E 'zone[0-9]$')"
2626
result=0
2727

2828
for (( i = 0; i < zone_num; i++ )); do

0 commit comments

Comments
 (0)