[rpcbind] Stop re-enabling with systemd (bz 1087951)
Steve Dickson
steved at fedoraproject.org
Thu Oct 23 17:42:29 UTC 2014
commit 2eca4852390afee7e0591072d9ba32257a678042
Author: Marcos Mello <marcosfrm at gmail.com>
Date: Thu Oct 23 13:36:38 2014 -0400
Stop re-enabling with systemd (bz 1087951)
Signed-off-by: Steve Dickson <steved at redhat.com>
rpcbind.spec | 31 +++++++++++++------------------
1 files changed, 13 insertions(+), 18 deletions(-)
---
diff --git a/rpcbind.spec b/rpcbind.spec
index 0c98327..c88660f 100644
--- a/rpcbind.spec
+++ b/rpcbind.spec
@@ -1,6 +1,6 @@
Name: rpcbind
Version: 0.2.1
-Release: 2.0%{?dist}
+Release: 2.1%{?dist}
Summary: Universal Addresses to RPC Program Number Mapper
Group: System Environment/Daemons
License: BSD
@@ -14,12 +14,12 @@ Source3: rpcbind.sysconfig
Requires: glibc-common setup
Conflicts: man-pages < 2.43-12
-BuildRequires: automake, autoconf, libtool, systemd-units
+BuildRequires: automake, autoconf, libtool, systemd
BuildRequires: libtirpc-devel, quota-devel, tcp_wrappers-devel
Requires(pre): coreutils shadow-utils
-Requires(post): chkconfig systemd-units systemd-sysv
-Requires(preun): systemd-units
-Requires(postun): systemd-units coreutils
+Requires(post): chkconfig systemd
+Requires(preun): systemd
+Requires(postun): systemd coreutils
Provides: portmap = %{version}-%{release}
Obsoletes: portmap <= 4.0-65.3
@@ -92,28 +92,20 @@ 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
- # Initial installation
- /bin/systemctl enable rpcbind.service >/dev/null 2>&1 || :
-fi
+%systemd_post rpcbind.service rpcbind.socket
%preun
+%systemd_preun rpcbind.service rpcbind.socket
if [ $1 -eq 0 ]; then
- # Package removal, not upgrade
- /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
+ /usr/bin/rm -f /var/lib/rpcbind/*
fi
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ]; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart rpcbind.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart rpcbind.service rpcbind.socket
%triggerun -- rpcbind < 0.2.0-15
%{_bindir}/systemd-sysv-convert --save rpcbind >/dev/null 2>&1 ||:
@@ -134,6 +126,9 @@ fi
%dir %attr(700,rpc,rpc) /var/lib/rpcbind
%changelog
+* Thu Oct 23 2014 Steve Dickson <steved at redhat.com> - 0.2.1-2.1
+- Stop re-enabling with systemd (bz 1087951)
+
* Thu Aug 21 2014 Kevin Fenzi <kevin at scrye.com> - 0.2.1-2.0
- Rebuild for rpm bug 1131960
More information about the scm-commits
mailing list