diff options
Diffstat (limited to 'meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/fan-table-init.sh')
-rw-r--r-- | meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/fan-table-init.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/fan-table-init.sh b/meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/fan-table-init.sh index 5706a73fb..68b699e0f 100644 --- a/meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/fan-table-init.sh +++ b/meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/fan-table-init.sh @@ -1,5 +1,11 @@ #!/bin/bash +FAN_TABLE_SKU_FILE="/usr/share/swampd/config-sku.json" +FAN_TABLE_FILE="/usr/share/swampd/config.json" + +# determine sku +cp $FAN_TABLE_SKU_FILE $FAN_TABLE_FILE + # wait for fan dbus mapper wait /xyz/openbmc_project/sensors/fan_tach/fan0 mapper wait /xyz/openbmc_project/sensors/fan_tach/fan1 @@ -12,9 +18,8 @@ mapper wait /xyz/openbmc_project/sensors/fan_tach/fb_fan2 # generate fan table writePath Fan_0_To_4_Hwmon="$(ls -la /sys/class/hwmon |grep pwm | head -n 1| tail -n +1|cut -d '/' -f 9)" -if [[ "$Fan_0_To_4_Hwmon" != "" ]] -then - sed -i "s/Fan_0_To_4_Hwmon/$Fan_0_To_4_Hwmon/g" /usr/share/swampd/config.json +if [[ "$Fan_0_To_4_Hwmon" != "" ]]; then + sed -i "s/Fan_0_To_4_Hwmon/$Fan_0_To_4_Hwmon/g" $FAN_TABLE_FILE fi # start read margin temp wait |