[389-ds-base/el6] get rid of posttrans - move update code to post (cherry picked from commit 026a8b4a3a7670ae89114204b
Richard Allen Megginson
rmeggins at fedoraproject.org
Wed Mar 21 18:56:10 UTC 2012
commit 1de85ff18e3619d74a845f167af0b4c6795f882b
Author: Rich Megginson <rmeggins at redhat.com>
Date: Wed Mar 21 10:59:30 2012 -0600
get rid of posttrans - move update code to post
(cherry picked from commit 026a8b4a3a7670ae89114204bb6c1f6808ee7c86)
389-ds-base.spec | 39 ++++++++++++++++++++-------------------
1 files changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/389-ds-base.spec b/389-ds-base.spec
index 2885bab..17d7199 100644
--- a/389-ds-base.spec
+++ b/389-ds-base.spec
@@ -16,7 +16,7 @@
Summary: 389 Directory Server (base)
Name: 389-ds-base
Version: 1.2.10.4
-Release: %{?relprefix}1%{?prerel}%{?dist}
+Release: %{?relprefix}2%{?prerel}%{?dist}
License: GPLv2 with exceptions
URL: http://port389.org/
Group: System Environment/Daemons
@@ -177,22 +177,8 @@ rm -rf $RPM_BUILD_ROOT
/sbin/chkconfig --add %{pkgname}
/sbin/ldconfig
/sbin/chkconfig --add %{pkgname}-snmp
-
-%preun
-if [ $1 = 0 ]; then # Final removal
- /sbin/service %{pkgname} stop >/dev/null 2>&1 || :
- /sbin/chkconfig --del %{pkgname}
- /sbin/service %{pkgname}-snmp stop >/dev/null 2>&1 || :
- /sbin/chkconfig --del %{pkgname}-snmp
-fi
-
-%postun
-/sbin/ldconfig
-if [ $1 = 0 ]; then # Final removal
- rm -rf /var/run/%{pkgname}
-fi
-
-%posttrans
+# restart the snmp subagent if needed
+/sbin/service %{pkgname}-snmp condrestart > /dev/null 2>&1
instbase="%{_sysconfdir}/%{pkgname}"
# echo posttrans - upgrading - looking for instances in $instbase
# find all instances
@@ -228,10 +214,22 @@ for inst in $instances ; do
# echo restarting instance $inst
/sbin/service %{pkgname} start $inst >/dev/null 2>&1
done
-# restart the snmp subagent if needed
-/sbin/service %{pkgname}-snmp condrestart > /dev/null 2>&1
exit 0
+%preun
+if [ $1 = 0 ]; then # Final removal
+ /sbin/service %{pkgname} stop >/dev/null 2>&1 || :
+ /sbin/chkconfig --del %{pkgname}
+ /sbin/service %{pkgname}-snmp stop >/dev/null 2>&1 || :
+ /sbin/chkconfig --del %{pkgname}-snmp
+fi
+
+%postun
+/sbin/ldconfig
+if [ $1 = 0 ]; then # Final removal
+ rm -rf /var/run/%{pkgname}
+fi
+
%files
%defattr(-,root,root,-)
%doc LICENSE EXCEPTION LICENSE.GPLv2
@@ -273,6 +271,9 @@ exit 0
%{_libdir}/%{pkgname}/libslapd.so.*
%changelog
+* Wed Mar 21 2012 Rich Megginson <rmeggins at redhat.com> - 1.2.10.4-2
+- get rid of posttrans - move update code to post
+
* Tue Mar 13 2012 Rich Megginson <rmeggins at redhat.com> - 1.2.10.4-1
- Ticket #305 - Certain CMP operations hang or cause ns-slapd to crash
More information about the scm-commits
mailing list