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

[docker-platform-monitor]: Add fancontrol #735

Merged
merged 1 commit into from
Jun 23, 2017
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion dockers/docker-platform-monitor/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ ENV DEBIAN_FRONTEND=noninteractive
# Update apt's package index files
RUN apt-get update

RUN apt-get install -y python-pip sensord
# Install required packages
RUN apt-get install -y python-pip sensord fancontrol

{% if docker_platform_monitor_debs.strip() %}
# Copy built Debian packages
Expand Down
22 changes: 16 additions & 6 deletions dockers/docker-platform-monitor/start.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
#!/usr/bin/env bash

mkdir -p /etc/sensors.d
if [ -e /usr/share/sonic/platform/sensors.conf ]; then
/bin/cp -rf /usr/share/sonic/platform/sensors.conf /etc/sensors.d/
fi

mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status

rm -f /var/run/rsyslogd.pid

supervisorctl start rsyslogd
supervisorctl start lm-sensors

# If this platform has an lm-sensors config file, copy it to it's proper place
# and start lm-sensors
if [ -e /usr/share/sonic/platform/sensors.conf ]; then
mkdir -p /etc/sensors.d
/bin/cp -f /usr/share/sonic/platform/sensors.conf /etc/sensors.d/
supervisorctl start lm-sensors
fi

# If this platform has a fancontrol config file, copy it to it's proper place
# and start fancontrol
if [ -e /usr/share/sonic/platform/fancontrol ]; then
/bin/cp -f /usr/share/sonic/platform/fancontrol /etc/
supervisorctl start fancontrol
fi

supervisorctl start ledd

10 changes: 9 additions & 1 deletion dockers/docker-platform-monitor/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,17 @@ autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

[program:fancontrol]
command=/usr/sbin/fancontrol
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why sbin?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's simply where it gets installed via the .deb package.

priority=4
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

[program:ledd]
command=/usr/bin/ledd
priority=6
priority=5
autostart=false
stdout_logfile=syslog
stderr_logfile=syslog
Expand Down