Add systemd-rpm macros

This commit is contained in:
Jan Synacek 2012-08-22 07:33:39 +02:00
parent 87459a13e9
commit a71bcdb6b3

View File

@ -146,27 +146,13 @@ touch -r RELNOTES RELNOTES.tmp
mv -f RELNOTES.tmp RELNOTES mv -f RELNOTES.tmp RELNOTES
%post %post
%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_post rdisc.service
%preun %preun
if [ $1 = 0 ]; then %systemd_preun rdisc.service
/bin/systemctl disable rdisc.service > /dev/null 2>&1 || :
/bin/systemctl stop rdisc.service > /dev/null 2>&1 || :
fi
%postun %postun
%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun_with_restart rdisc.service
if [ "$1" -ge "1" ]; then
/bin/systemctl try-restart rdisc.service >/dev/null 2>&1 || :
fi
%triggerun -- %{name} < 20101006-9
/sbin/chkconfig --del rdisc >/dev/null 2>&1 || :
/bin/systemctl try-restart rdisc.service >/dev/null 2>&1 || :
%triggerpostun -n %{name}-sysvinit -- %{name} < 20101006-9
/sbin/chkconfig --add rdisc >/dev/null 2>&1 || :
%files %files
%doc RELNOTES README.bonding %doc RELNOTES README.bonding
@ -191,6 +177,7 @@ fi
%changelog %changelog
* Wed Aug 22 2012 Jan Synáček <jsynacek@redhat.com> - 20101006-18 * Wed Aug 22 2012 Jan Synáček <jsynacek@redhat.com> - 20101006-18
- Improve spec for fedora - Improve spec for fedora
- Add systemd-rpm macros
* Mon Jul 23 2012 Jan Synáček <jsynacek@redhat.com> 20101006-17 * Mon Jul 23 2012 Jan Synáček <jsynacek@redhat.com> 20101006-17
- Minor update: capabilities patch - Minor update: capabilities patch