r1681 - in zope-debhelper/trunk (5 files)

Jonas Meurer mejo at alioth.debian.org
Sat Aug 8 11:50:09 UTC 2009


    Date: Saturday, August 8, 2009 @ 11:50:08
  Author: mejo
Revision: 1681

use initscripts instead of dzhandle zopectl|zeoctl

Modified:
  zope-debhelper/trunk/autoscripts/postinst-dzinstance
  zope-debhelper/trunk/autoscripts/postrm-dzinstance
  zope-debhelper/trunk/autoscripts/preinst-dzinstance
  zope-debhelper/trunk/autoscripts/prerm-dzinstance
  zope-debhelper/trunk/debian/changelog

Modified: zope-debhelper/trunk/autoscripts/postinst-dzinstance
===================================================================
--- zope-debhelper/trunk/autoscripts/postinst-dzinstance	2009-08-08 10:34:02 UTC (rev 1680)
+++ zope-debhelper/trunk/autoscripts/postinst-dzinstance	2009-08-08 11:50:08 UTC (rev 1681)
@@ -12,6 +12,12 @@
     fi
 }
 
+if command -v invoke-rc.d >/dev/null 2>&1; then
+	INVOKE="invoke-rc.d"
+else
+	INVOKE="/etc/init.d/zope$ZVER"
+fi
+
 case "$1" in
   abort-deconfigure|abort-remove|abort-upgrade)
     ;;
@@ -21,7 +27,7 @@
         echo "Zope$ZVER instance '$INSTANCE' already exists."
         add_products
 	if [ "$DATABASE" = "ZEO" ]; then
-	    if ! dzhandle -z $ZVER zeoctl $INSTANCE start; then
+            if ! "$INVOKE" start "ZEOSERVER=$INSTANCE"; then
 	        echo "Could not start the zeo database which was"
 		echo "configured for the zope instance. Please"
 		echo "check for errors by running zeo by hand"
@@ -30,7 +36,7 @@
 	    fi
 	fi
 	if [ -z "$ZEOFAILURE" ]; then
-            if ! dzhandle -z $ZVER zopectl $INSTANCE start; then
+            if ! "$INVOKE" start "INSTANCE=$INSTANCE"; then
                 echo "Could not start zope instance $INSTANCE. Please check"
                 echo "for errors running the instance by hand:"
                 echo "  /var/lib/zope$ZVER/instance/$INSTANCE/runzope"
@@ -79,7 +85,7 @@
             db_set $PKG/admin-password ""
             db_set $PKG/admin-password-confirmation ""
             add_products
-            if ! dzhandle -z $ZVER zopectl $INSTANCE start; then
+            if ! "$INVOKE" start "INSTANCE=$INSTANCE"; then
                 echo "Could not start zope instance $INSTANCE. Please check"
                 echo "for errors running the instance by hand:"
                 echo "  /var/lib/zope$ZVER/instance/$INSTANCE/runzope"

Modified: zope-debhelper/trunk/autoscripts/postrm-dzinstance
===================================================================
--- zope-debhelper/trunk/autoscripts/postrm-dzinstance	2009-08-08 10:34:02 UTC (rev 1680)
+++ zope-debhelper/trunk/autoscripts/postrm-dzinstance	2009-08-08 11:50:08 UTC (rev 1681)
@@ -9,6 +9,12 @@
 
 [ -n "$(echo $INSTANCE)" ] || exit 1
 
+if command -v invoke-rc.d >/dev/null 2>&1; then
+	INVOKE="invoke-rc.d"
+else
+	INVOKE="/etc/init.d/zope$ZVER"
+fi
+
 case "$1" in
   failed-upgrade|abort-install|abort-upgrade|disappear)
     ;;
@@ -17,10 +23,10 @@
     ;;
 
   remove)
-    dzhandle -z $ZVER zopectl $INSTANCE stop || true
+    /etc/init.d/zope$ZVER stop "INSTANCE=$INSTANCE" || true
     dzhandle -z $ZVER remove-instance $INSTANCE || true
     if [ "$DATABASE" = "ZEO" ]; then
-        dzhandle -z $ZVER zeoctl $INSTANCE stop || true
+	"$INVOKE" zope$ZVER stop "ZEOSERVER=$INSTANCE" || true
         dzhandle -z $ZVER remove-zeoinstance $INSTANCE || true
     fi
     ;;

Modified: zope-debhelper/trunk/autoscripts/preinst-dzinstance
===================================================================
--- zope-debhelper/trunk/autoscripts/preinst-dzinstance	2009-08-08 10:34:02 UTC (rev 1680)
+++ zope-debhelper/trunk/autoscripts/preinst-dzinstance	2009-08-08 11:50:08 UTC (rev 1681)
@@ -3,19 +3,25 @@
 ZVER=#DZ-ZVER#
 DATABASE=#DZ-DATABASE#
 
+if command -v invoke-rc.d >/dev/null 2>&1; then
+	INVOKE="invoke-rc.d"
+else
+	INVOKE="/etc/init.d/zope$ZVER"
+fi
+
 case "$1" in
     install|upgrade)
 	if [ "$1" = "upgrade" ]; then
-        if [ "$DATABASE" = "ZEO" ]; then
-	        dzhandle -z $ZVER zeoctl $INSTANCE stop || true
-        fi
-	    dzhandle -z $ZVER zopectl $INSTANCE stop || true
+	    if [ "$DATABASE" = "ZEO" ]; then
+		"$INVOKE" zope$ZVER stop "ZEOSERVER=$INSTANCE" || true
+	    fi
+	    "$INVOKE" zope$ZVER stop "INSTANCE=$INSTANCE" || true
 	fi
-        ;;
+	;;
     failed-upgrade)
-        ;;
+	;;
     *)
-        echo "preinst called with unknown argument \`$1'" >&2
-        exit 1
+	echo "preinst called with unknown argument \`$1'" >&2
+	exit 1
     ;;
 esac

Modified: zope-debhelper/trunk/autoscripts/prerm-dzinstance
===================================================================
--- zope-debhelper/trunk/autoscripts/prerm-dzinstance	2009-08-08 10:34:02 UTC (rev 1680)
+++ zope-debhelper/trunk/autoscripts/prerm-dzinstance	2009-08-08 11:50:08 UTC (rev 1681)
@@ -5,20 +5,26 @@
 
 [ -n "$(echo $INSTANCE)" ] || exit 1
 
+if command -v invoke-rc.d >/dev/null 2>&1; then
+	INVOKE="invoke-rc.d"
+else
+	INVOKE="/etc/init.d/zope$ZVER"
+fi
+
 remove_products()
 {
     products="#DZ-PRODUCTS#"
     if [ -n "$products" ]; then
-    	dzhandle -z $ZVER remove-product --lazy --force $INSTANCE $products
+	dzhandle -z $ZVER remove-product --lazy --force $INSTANCE $products
     fi
 }
 
 case "$1" in
   remove|upgrade)
     if [ "$DATABASE" = "ZEO" ]; then
-        dzhandle -z $ZVER zeoctl $INSTANCE stop || true
+	"$INVOKE" zope$ZVER stop "ZEOSERVER=$INSTANCE" || true
     fi
-    dzhandle -z $ZVER zopectl $INSTANCE stop || true
+    $INVOKE zope$ZVER stop "INSTANCE=$INSTANCE" || true
     remove_products || true
     ;;
 

Modified: zope-debhelper/trunk/debian/changelog
===================================================================
--- zope-debhelper/trunk/debian/changelog	2009-08-08 10:34:02 UTC (rev 1680)
+++ zope-debhelper/trunk/debian/changelog	2009-08-08 11:50:08 UTC (rev 1681)
@@ -1,3 +1,12 @@
+zope-debhelper (0.3.14) unstable; urgency=high
+
+  * use 'invoke-rc.d {start|stop} {ZEOSERVER|INSTANCE}=$INSTANCE' in
+    maintainer scripts instead of dzhandle. That is required in order
+    to fix bug #540158 and #540159.
+  * set urgency=high for that reason.
+
+ -- Jonas Meurer <mejo at debian.org>  Sat, 08 Aug 2009 13:49:07 +0200
+
 zope-debhelper (0.3.13) unstable; urgency=low
 
   * update section to zope.




More information about the pkg-zope-commits mailing list