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