#!/bin/sh

MAXIMUM_WAITING_TIME=180
loop_continue=1
count=0

while [ \( $count -lt $MAXIMUM_WAITING_TIME \) -a \( "$loop_continue" -gt 0 \) ]
do
	sleep 1
	count=$((count+1))
	BBSP=$(cat /sys/class/hwmon/bbsp)
	BBSP_DEC=$((0x$BBSP))

	if [ $BBSP_DEC -ge $((0x20)) ]; then
		loop_continue=0
	fi
done

logger "Starting sync of Expander thresholds"
/usr/local/bin/oem_ipmi acp init_expander_thresholds &