blob: 5706a73fb824cc11f3bc86d7bae17cd6ffacaa0f [file] [log] [blame]
George Hungb67a01a2020-06-30 10:47:30 +08001#!/bin/bash
2
3# wait for fan dbus
4mapper wait /xyz/openbmc_project/sensors/fan_tach/fan0
5mapper wait /xyz/openbmc_project/sensors/fan_tach/fan1
George Hung43bbb292020-07-16 13:47:14 +08006mapper wait /xyz/openbmc_project/sensors/fan_tach/fb_fan0
7mapper wait /xyz/openbmc_project/sensors/fan_tach/fb_fan1
8mapper wait /xyz/openbmc_project/sensors/fan_tach/fb_fan2
George Hungb67a01a2020-06-30 10:47:30 +08009
10/usr/bin/fan-default-speed.sh
11
12# generate fan table writePath
13Fan_0_To_4_Hwmon="$(ls -la /sys/class/hwmon |grep pwm | head -n 1| tail -n +1|cut -d '/' -f 9)"
14
15if [[ "$Fan_0_To_4_Hwmon" != "" ]]
16then
17 sed -i "s/Fan_0_To_4_Hwmon/$Fan_0_To_4_Hwmon/g" /usr/share/swampd/config.json
18fi
19
20# start read margin temp wait
21/usr/bin/read-margin-temp-wait.sh &
22
23exit 0