1
0
forked from rpms/rpcbind

Stop re-enabling with systemd (bz 1087951)

Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
Marcos Mello 2014-10-23 13:36:38 -04:00 committed by Steve Dickson
parent f5896d179f
commit 2eca485239

View File

@ -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@redhat.com> - 0.2.1-2.1
- Stop re-enabling with systemd (bz 1087951)
* Thu Aug 21 2014 Kevin Fenzi <kevin@scrye.com> - 0.2.1-2.0
- Rebuild for rpm bug 1131960