[nas] Modernize systemd scriptlets
Petr Pisar
ppisar at fedoraproject.org
Wed Aug 22 15:07:46 UTC 2012
commit 237bfb07210e1f3b49f8881e1afa40b6a045aca6
Author: Petr Písař <ppisar at redhat.com>
Date: Wed Aug 22 17:00:53 2012 +0200
Modernize systemd scriptlets
nas.spec | 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/nas.spec b/nas.spec
index 40291a1..d66b0da 100644
--- a/nas.spec
+++ b/nas.spec
@@ -1,7 +1,7 @@
Name: nas
Summary: The Network Audio System (NAS)
Version: 1.9.3
-Release: 3%{?dist}
+Release: 4%{?dist}
URL: http://radscan.com/nas.html
License: Public Domain
Group: Development/Libraries
@@ -90,24 +90,13 @@ mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/nasd.conf{.eg,}
%post
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post %{daemon}.service
%preun
-if [ $1 -eq 0 ] ; then
- # Package removal, not upgrade
- /bin/systemctl --no-reload disable %{daemon}.service > /dev/null 2>&1 || :
- /bin/systemctl stop %{daemon}.service > /dev/null 2>&1 || :
-fi
+%systemd_preun %{daemon}.service
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart %{daemon}.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart %{daemon}.service
%triggerun -- %{name} < 1.9.3-1
echo '%{name}: User must migrate to systemd target manually by runnig:'
@@ -149,6 +138,9 @@ echo ' systemd-sysv-convert --apply %{daemon}'
%changelog
+* Wed Aug 22 2012 Petr Pisar <ppisar at redhat.com> - 1.9.3-4
+- Modernize systemd scriptlets
+
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.9.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list