diff options
Diffstat (limited to 'pcr/openrc-misc/lm_sensors.install')
-rw-r--r-- | pcr/openrc-misc/lm_sensors.install | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/pcr/openrc-misc/lm_sensors.install b/pcr/openrc-misc/lm_sensors.install new file mode 100644 index 000000000..8b9260556 --- /dev/null +++ b/pcr/openrc-misc/lm_sensors.install @@ -0,0 +1,28 @@ +_svc=('lm_sensors' 'fancontrol' 'sensord') +_rlvl=('boot' 'default') + +post_install() { + _cmd="rc-update add ${_svc[0]} ${_rlvl[0]}" + echo " ==> run '${_cmd}'" + _cmd="rc-update add ${_svc[1]} ${_rlvl[1]}" + echo " ==> run '${_cmd}'" + _cmd="rc-update add ${_svc[2]} ${_rlvl[1]}" + echo " ==> run '${_cmd}'" + + + echo "To set command args for ${_svc[2]}, add 'SENSORD_OPTIONS=""'" + echo "to /etc/conf.d/sensord" +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + _cmd="rc-update del ${_svc[0]} ${_rlvl[0]}" + echo " ==> run '${_cmd}'" + _cmd="rc-update del ${_svc[1]} ${_rlvl[1]}" + echo " ==> run '${_cmd}'" + _cmd="rc-update del ${_svc[2]} ${_rlvl[1]}" + echo " ==> run '${_cmd}'" +} |