From 637cface90a820790a1ecccc5550ac945d443f1f Mon Sep 17 00:00:00 2001 From: Tom "spot" Callaway Date: Sep 09 2011 16:47:36 +0000 Subject: fix scriptlets to enable service by default --- 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 - 0.2.0-14 +- fix scriptlets to enable service by default + * Fri Jul 8 2011 Steve Dickson - 0.2.0-13 - Spec file clean up