diff options
author | Patrick Venture <venture@google.com> | 2018-10-02 23:51:33 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-10-04 21:37:13 +0300 |
commit | 31c43a12a578f8c9f67cb508f37317a8cbe72558 (patch) | |
tree | eaa9d067422a8528c751da8d54cb138535ab574d /meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon/start_max31785_hwmon.sh | |
parent | d12e42ee4a02dc2a435678d919cebfd6661cd9b8 (diff) | |
download | openbmc-31c43a12a578f8c9f67cb508f37317a8cbe72558.tar.xz |
meta-ibm: witherspoon: rename phosphor-hwmon
Rename phosphor-hwmon%.bbappend to phosphor-hwmon_%.bbappend.
Tested: Built witherspoon and verified confs in rootfs.
(From meta-ibm rev: 8d8818d02a77c3bf1cd78e241e60f35668a6af51)
Change-Id: Iec17ed4eee5867d95331778f64dd4f9adc1825cd
Signed-off-by: Patrick Venture <venture@google.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon/start_max31785_hwmon.sh')
-rwxr-xr-x | meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon/start_max31785_hwmon.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon/start_max31785_hwmon.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon/start_max31785_hwmon.sh new file mode 100755 index 000000000..6d4e6ba1e --- /dev/null +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon/start_max31785_hwmon.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# Copy in the correct MAX31785 phosphor-hwmon config file to use based on the +# WaterCooled property, and then start the hwmon service. + +# $1: The OF_FULLNAME udev attribute for the MAX31785 + +base="/etc/default/obmc/hwmon/"$1 +target=$base".conf" + +service=$(mapper get-service /xyz/openbmc_project/inventory/system/chassis) + +if [ $(busctl get-property $service \ + /xyz/openbmc_project/inventory/system/chassis \ + xyz.openbmc_project.Inventory.Decorator.CoolingType \ + WaterCooled | grep true | wc -l) != 0 ]; +then + source=$base'_water.conf' +else + source=$base'_air.conf' +fi + +cp $source $target + +instance=$(systemd-escape $1) +systemctl start xyz.openbmc_project.Hwmon@$instance.service |