SPECS: template-webapp.spec - run update in an order that latest c...

glen glen at pld-linux.org
Wed Nov 30 20:53:25 CET 2005


Author: glen                         Date: Wed Nov 30 19:53:24 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- run update in an order that latest config will be used even in cases all rpmsave files are found

---- Files affected:
SPECS:
   template-webapp.spec (1.28 -> 1.29) 

---- Diffs:

================================================================
Index: SPECS/template-webapp.spec
diff -u SPECS/template-webapp.spec:1.28 SPECS/template-webapp.spec:1.29
--- SPECS/template-webapp.spec:1.28	Wed Nov 30 20:50:48 2005
+++ SPECS/template-webapp.spec	Wed Nov 30 20:53:19 2005
@@ -70,6 +70,19 @@
 %if 00000000000000000000000000000000000
 # SAMPLE TRIGGER FOR MIGRATION PURPOSES
 %triggerpostun -- %{name} < 1.3.9-1.4
+# nuke very-old config location (this mostly for Ra)
+if [ -f /etc/httpd/httpd.conf ]; then
+	sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
+	httpd_reload=1
+fi
+
+# migrate from httpd (apache2) config dir
+if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
+	cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
+	mv -f /etc/httpd/%{name}.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
+	httpd_reload=1
+fi
+
 # migrate from apache-config macros
 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
 	if [ -d /etc/apache/webapps.d ]; then
@@ -98,19 +111,6 @@
 	rm -f /etc/apache-%{name}.conf.rpmsave
 fi
 
-# migrate from httpd (apache2) config dir
-if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
-	cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
-	mv -f /etc/httpd/%{name}.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
-	httpd_reload=1
-fi
-
-# nuke very-old config location (this mostly for Ra)
-if [ -f /etc/httpd/httpd.conf ]; then
-	sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
-	httpd_reload=1
-fi
-
 # place new config location, as trigger puts config only on first install, do it here.
 # apache1
 if [ -d /etc/apache/webapps.d ]; then
@@ -153,6 +153,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.29  2005/11/30 19:53:19  glen
+- run update in an order that latest config will be used even in cases all rpmsave files are found
+
 Revision 1.28  2005/11/30 19:50:48  glen
 - avoid leaving around .rpmsave files which have already been put to new place
   this prevents those old .rpmsave being catched up by new triggers in future
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/template-webapp.spec?r1=1.28&r2=1.29&f=u




More information about the pld-cvs-commit mailing list