PREIN
/bin/sh
if [ -f /var/lock/subsys/sensors ]; then
mv -f /var/lock/subsys/sensors /var/lock/subsys/sensord
fi
if [ -f /etc/rc.d/init.d/sensors ]; then
/sbin/chkconfig --del sensors
fi
if [ -f /etc/sysconfig/sensors ]; then
cp -a /etc/sysconfig/sensors /etc/sysconfig/sensord
fi
PREUN
/bin/sh
if [ "$1" = "0" ]; then
{
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/sensord ]; then
/sbin/service sensord stop 1>&2 || :;
fi
fi };
/sbin/chkconfig --del sensord
fi
if [ $1 -eq 0 ] && [ -x "/lib/systemd/systemd-update-helper" ]; then
# Package removal, not upgrade
/lib/systemd/systemd-update-helper remove-system-units sensord.service || :
fi
POSTIN
/bin/sh
/sbin/chkconfig --add sensord
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/sensord ] && . /etc/sysconfig/sensord
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/sensord ]; then
/sbin/service sensord restart 1>&2 || :;
else
echo 'Run "/sbin/service sensord start" to start sensors daemon.'
fi
fi
else
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/sensord ]; then
echo 'Run "/sbin/service sensord restart" to restart sensors daemon.'
fi
else NORESTART=1 # for %%systemd_post if called after
fi
fi };
if [ $1 -eq 1 ] && [ -x "/lib/systemd/systemd-update-helper" ]; then
# Initial installation
/lib/systemd/systemd-update-helper install-system-units sensord.service || :
fi
POSTUN
/bin/sh
[ -x "/lib/systemd/systemd-update-helper" ] &&
/lib/systemd/systemd-update-helper system-reload || :
Triggers
lm_sensors-sensord <
3.3.2-2
/bin/sh
if [ $1 -eq 1 ] && [ -x "/lib/systemd/systemd-update-helper" ]; then
# Initial installation
/lib/systemd/systemd-update-helper install-system-units sensord.service || :
fi