Mustafa Shehabi | 5c19b5b | 2021-09-15 16:41:44 -0500 | [diff] [blame] | 1 | #!/bin/bash |
Avenash Asai Thambi | 90a3ae4 | 2022-03-24 10:22:01 -0500 | [diff] [blame] | 2 | #Prototype CPU detection script |
Mustafa Shehabi | 5c19b5b | 2021-09-15 16:41:44 -0500 | [diff] [blame] | 3 | |
| 4 | # Provide source directive to shellcheck. |
| 5 | # shellcheck source=meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-lib.sh |
| 6 | source /usr/libexec/kudo-fw/kudo-lib.sh |
| 7 | |
Avenash Asai Thambi | 90a3ae4 | 2022-03-24 10:22:01 -0500 | [diff] [blame] | 8 | CPU1_STATUS_N=$(get_gpio_ctrl S1_STATUS_N) |
Mustafa Shehabi | 5c19b5b | 2021-09-15 16:41:44 -0500 | [diff] [blame] | 9 | sleep 60 |
Avenash Asai Thambi | 90a3ae4 | 2022-03-24 10:22:01 -0500 | [diff] [blame] | 10 | if [[ $CPU1_STATUS_N == 1 ]]; then |
| 11 | cp -f /etc/virtual-sensor/configurations/virtual_sensor_config1p.json /usr/share/phosphor-virtual-sensor/virtual_sensor_config.json |
| 12 | else |
| 13 | cp -f /etc/virtual-sensor/configurations/virtual_sensor_config2p.json /usr/share/phosphor-virtual-sensor/virtual_sensor_config.json |
| 14 | fi |