diff --git a/autofs.spec b/autofs.spec index fadc25c..0c603bc 100644 --- a/autofs.spec +++ b/autofs.spec @@ -8,7 +8,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.0.7 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -104,12 +104,7 @@ rm -rf $RPM_BUILD_ROOT %post %if %{with_systemd} -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -eq 1 ]; then - %{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || : - # autofs has been approved to be enabled by default - %{_bindir}/systemctl enable %{name}.service >/dev/null 2>&1 || : -fi +%systemd_post %{name}.service %else if [ $1 -eq 1 ]; then %{_sbindir}/sbin/chkconfig --add autofs @@ -118,10 +113,7 @@ fi %preun %if %{with_systemd} -if [ $1 -eq 0 ] ; then - %{_bindir}/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || : - %{_bindir}/systemctl stop %{name}.service > /dev/null 2>&1 || : -fi +%systemd_preun %{name}.service %else if [ $1 -eq 0 ] ; then %{_sbindir}/service autofs stop > /dev/null 2>&1 || : @@ -131,10 +123,7 @@ fi %postun %if %{with_systemd} -%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - %{_bindir}/systemctl try-restart %{name}.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart %{name}.service %else if [ $1 -ge 1 ] ; then %{_sbindir}/sbin/service autofs condrestart > /dev/null 2>&1 || : @@ -171,6 +160,9 @@ fi %dir /etc/auto.master.d %changelog +* Mon Aug 27 2012 Ian Kent - 1:5.0.7-2 +- update systemd scriplet macros (bz850040). + * Wed Jul 25 2012 Ian Kent - 1:5.0.7-1 - Update to upstream version 5.0.7.