Migration to new systemd scriptlet macros
This commit is contained in:
parent
1cc8cc754a
commit
4834b6aee2
@ -1,6 +1,6 @@
|
||||
Name: lm_sensors
|
||||
Version: 3.3.2
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
URL: http://www.lm-sensors.org/
|
||||
Source: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
|
||||
Source1: lm_sensors.sysconfig
|
||||
@ -94,34 +94,33 @@ if [ -L /etc/rc3.d/S26lm_sensors ]; then
|
||||
fi
|
||||
/sbin/chkconfig --del lm_sensors
|
||||
|
||||
# ===== main =====
|
||||
|
||||
%post
|
||||
%systemd_post lm_sensors.service
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable lm_sensors.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_preun lm_sensors.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart lm_sensors.service
|
||||
|
||||
# ==== sensord ===
|
||||
|
||||
%post sensord
|
||||
%systemd_post sensord.service
|
||||
|
||||
%preun sensord
|
||||
%systemd_preun sensord.service
|
||||
|
||||
%postun sensord
|
||||
%systemd_postun_with_restart sensord.service
|
||||
|
||||
# ===== libs =====
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
%post sensord
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%preun sensord
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable sensord.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop sensord.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart sensord.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
@ -158,6 +157,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Aug 27 2012 Jaromir Capik <jcapik@redhat.com> - 3.3.2-4
|
||||
- Migration to new systemd scriptlet macros
|
||||
|
||||
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user