[fcoe-utils] Migrate to systemd scriptlets

Petr Šabata psabata at fedoraproject.org
Tue Aug 28 11:50:33 UTC 2012


commit 0d7f2241f69154f9c0afb24e7910fc0961f8ffbd
Author: Petr Šabata <contyk at redhat.com>
Date:   Tue Aug 28 13:44:02 2012 +0200

    Migrate to systemd scriptlets

 fcoe-utils.spec |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/fcoe-utils.spec b/fcoe-utils.spec
index 88d6c74..6f1445c 100644
--- a/fcoe-utils.spec
+++ b/fcoe-utils.spec
@@ -3,7 +3,7 @@
 
 Name:               fcoe-utils
 Version:            1.0.24
-Release:            1%{?dist}
+Release:            2%{?dist}
 Summary:            Fibre Channel over Ethernet utilities
 Group:              Applications/System
 License:            GPLv2
@@ -65,20 +65,13 @@ install -m 755 debug/fcoedump.sh %{buildroot}%{_libexecdir}/fcoe/fcoedump.sh
 install -m 755 debug/dcbcheck.sh %{buildroot}%{_libexecdir}/fcoe/dcbcheck.sh
 
 %post
-if [ $1 -eq 1 ]; then
-    systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post fcoe.service
 
 %preun
-if [ $1 -eq 0 ]; then
-    systemctl --no-reload disable fcoe.service >/dev/null 2>&1 || :
-    systemctl stop fcoe.service >/dev/null 2>&1 || :
-fi
+%systemd_preun fcoe.service
 
 %postun
-if [ $1 -ge 1 ]; then
-    systemctl try-restart %{name}.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart fcoe.service
 
 %files
 %doc README COPYING quickstart.txt
@@ -98,6 +91,9 @@ fi
 
 
 %changelog
+* Tue Aug 28 2012 Petr Šabata <contyk at redhat.com> - 1.0.24-2
+- Migrate to systemd scriptlets (#850104)
+
 * Wed Aug 15 2012 Petr Šabata <contyk at redhat.com> - 1.0.24-1
 - 1.0.24 bump
 


More information about the scm-commits mailing list