Skip to content

Commit

Permalink
hw-mgmt: scripts: Delete psuN_i2c_bus files when PSUs are plugged out
Browse files Browse the repository at this point in the history
These files are generated when PSUs are detected on I2C bus.
However they are not removed when PSUs are plugged out. This
makes it difficult to differentiate between real and dummy PSUs
since dummy PSUs are not visible on I2C.

Signed-off-by: Felix Radensky <[email protected]>
  • Loading branch information
felixradensky committed Jan 6, 2025
1 parent d460b40 commit 1b610a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions usr/usr/bin/hw-management-thermal-events.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,9 @@ else
rm -f "$config_path"/"$psu_name"_power_slope
rm -f "$config_path"/"$psu_name"_power_capacity
fi
if [ -e "$config_path"/"$psu_name"_i2c_bus ]; then
rm -f "$config_path"/"$psu_name"_i2c_bus
fi
fi
if [ "$2" == "sxcore" ]; then
/usr/bin/hw-management.sh chipdown 0 "$4/$5"
Expand Down

0 comments on commit 1b610a3

Please sign in to comment.