[evolvis-commits] r16424: Add postinst and prerm for blocks↵

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Mar 1 01:17:38 CET 2011


Author: mirabilos
Date: 2011-03-01 01:17:38 +0100 (Tue, 01 Mar 2011)
New Revision: 16424

Added:
   trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin-blocks.postinst
   trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin-blocks.prerm
Log:
Add postinst and prerm for blocks


Added: trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin-blocks.postinst
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin-blocks.postinst	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin-blocks.postinst	2011-03-01 00:17:38 UTC (rev 16424)
@@ -0,0 +1,61 @@
+#! /bin/sh
+# postinst script for @PACKAGE at -plugin-blocks
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+	@PACKAGE at -config
+
+	# Prepare database
+	/usr/share/@OLDPACKAGE@/bin/register-plugin blocks "Blocks"
+	test -f /etc/default/apache2 && . /etc/default/apache2
+	if [ "$NO_START" != "0" ]; then
+		if [ -x /usr/sbin/apache ]; then
+			invoke-rc.d --quiet apache reload
+		fi
+	else
+		if [ -x /usr/sbin/apache2 ]; then
+			invoke-rc.d --quiet apache2 reload
+		fi
+	fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+

Added: trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin-blocks.prerm
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin-blocks.prerm	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin-blocks.prerm	2011-03-01 00:17:38 UTC (rev 16424)
@@ -0,0 +1,55 @@
+#! /bin/sh
+# prerm script for @OLDPACKAGE at -plugin-blocks
+#
+# see: dh_installdeb(1)
+set -e
+
+#DEBHELPER#
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|deconfigure)
+	if [ -f /var/run/postgresql/.s.PGSQL.5432 ]
+	then
+		/usr/share/@OLDPACKAGE@/bin/unregister-plugin blocks
+	else
+		echo "WARNING: GForge database not available to unregister scmsvn plugin"
+	fi
+	test -f /etc/default/apache2 && . /etc/default/apache2
+	if [ "$NO_START" != "0" ]; then
+		if [ -x /usr/sbin/apache ]; then
+			invoke-rc.d --quiet apache reload
+		fi
+	else
+		if [ -x /usr/sbin/apache2 ]; then
+			invoke-rc.d --quiet apache2 reload
+		fi
+	fi
+        ;;
+    upgrade|failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+
+
+exit 0
+
+



More information about the evolvis-commits mailing list