Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sensors]: Workaround for apparent bug in lm-sensors #1058

Merged
merged 1 commit into from
Oct 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion dockers/docker-platform-monitor/lm-sensors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,19 @@
# Based off /etc/init.d/lm-sensors
#

/usr/bin/sensors -s > /dev/null 2>&1

# NOTE: lm-sensors v3.3.5 appears to have a bug. If `sensors -s` is called, it
# will first load /etc/sensors.conf, then load all files in /etc/sensors.d/,
# overriding any values that may have already been specified in
# /etc/sensors.conf. However, it appears this overriding is not taking place.
# As a workaround, as long as a platform-specific sensors.conf has been copied
# to /etc/sensors.d/, we will ONLY load that file, otherwise we load the default.
if [ -e /etc/sensors.d/sensors.conf ]; then
/usr/bin/sensors -s -c /etc/sensors.d/sensors.conf > /dev/null 2>&1
else
/usr/bin/sensors -s > /dev/null 2>&1
fi

/usr/bin/sensors > /dev/null 2>&1

# Currently, there is no way to run sensord in the foreground, so we
Expand Down