[rpcbind/f16] fix scriptlets to enable service by default
Tom Callaway
spot at fedoraproject.org
Fri Sep 9 16:47:50 UTC 2011
commit 637cface90a820790a1ecccc5550ac945d443f1f
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date: Fri Sep 9 12:47:36 2011 -0400
fix scriptlets to enable service by default
rpcbind.spec | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/rpcbind.spec b/rpcbind.spec
index 7a2e013..46ced49 100644
--- a/rpcbind.spec
+++ b/rpcbind.spec
@@ -1,6 +1,6 @@
Name: rpcbind
Version: 0.2.0
-Release: 13%{?dist}
+Release: 14%{?dist}
Summary: Universal Addresses to RPC Program Number Mapper
Group: System Environment/Daemons
License: BSD
@@ -89,21 +89,22 @@ if [ -z "$rpcid" -o "$rpcid" != "32" ]; then
/usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \
-M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1
fi
-%post
-if [ $1 -eq 1 ]; then
- # Package install, not upgrade
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+%post
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ /bin/systemctl enable rpcbind.service >/dev/null 2>&1 || :
fi
%preun
if [ $1 -eq 0 ]; then
# Package removal, not upgrade
- /bin/systemctl --no-reload rpcbind.service >/dev/null 2>&1 || :
+ /bin/systemctl --no-reload disable rpcbind.service >/dev/null 2>&1 || :
/bin/systemctl stop rpcbind.service >/dev/null 2>&1 || :
/usr/sbin/userdel rpc 2>/dev/null || :
/usr/sbin/groupdel rpc 2>/dev/null || :
rm -rf /var/lib/rpcbind
fi
+
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ]; then
@@ -113,7 +114,7 @@ fi
%triggerun -- rpcbind < 0.2.0-12
%{_bindir}/systemd-sysv-convert --save rpcbind >/dev/null 2>&1 ||:
-/bin/systemctl enable rpcbind.service >/dev/null 2>&1
+/bin/systemctl --no-reload enable rpcbind.service >/dev/null 2>&1
/sbin/chkconfig --del rpcbind >/dev/null 2>&1 || :
/bin/systemctl try-restart rpcbind.service >/dev/null 2>&1 || :
@@ -129,6 +130,9 @@ fi
%dir %attr(700,rpc,rpc) /var/lib/rpcbind
%changelog
+* Fri Sep 9 2011 Tom Callaway <spot at fedoraproject.org> - 0.2.0-14
+- fix scriptlets to enable service by default
+
* Fri Jul 8 2011 Steve Dickson <steved at redhat.com> - 0.2.0-13
- Spec file clean up
More information about the scm-commits
mailing list