diff options
Diffstat (limited to 'meta-fii/meta-kudo/recipes-phosphor/fans/pwm-init')
-rw-r--r-- | meta-fii/meta-kudo/recipes-phosphor/fans/pwm-init/bin/pwm_init.sh | 6 | ||||
-rw-r--r-- | meta-fii/meta-kudo/recipes-phosphor/fans/pwm-init/pwm_init.service | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/meta-fii/meta-kudo/recipes-phosphor/fans/pwm-init/bin/pwm_init.sh b/meta-fii/meta-kudo/recipes-phosphor/fans/pwm-init/bin/pwm_init.sh new file mode 100644 index 000000000..d559f6a31 --- /dev/null +++ b/meta-fii/meta-kudo/recipes-phosphor/fans/pwm-init/bin/pwm_init.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# +# Set all fans to pwm mode. + +# Set all pwm_enable to 1 +find /sys/class/hwmon/hwmon*/ -name 'pwm*_enable' -exec bash -c 'echo "${1}" && echo 1 > "${1}" && cat "${1}"' -- {} \;
\ No newline at end of file diff --git a/meta-fii/meta-kudo/recipes-phosphor/fans/pwm-init/pwm_init.service b/meta-fii/meta-kudo/recipes-phosphor/fans/pwm-init/pwm_init.service new file mode 100644 index 000000000..981b8773c --- /dev/null +++ b/meta-fii/meta-kudo/recipes-phosphor/fans/pwm-init/pwm_init.service @@ -0,0 +1,11 @@ +[Unit] +Description=Init PWM sensors +Before=xyz.openbmc_project.fansensor.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/pwm_init.sh + +[Install] +WantedBy=multi-user.target +WantedBy=xyz.openbmc_project.fansensor.service |