[Fusionforge-commits] r11278 - trunk/src/debian/dsf-in

Christian Bayle cbayle at libremir.placard.fr.eu.org
Mon Nov 1 00:30:27 CET 2010


Author: cbayle
Date: 2010-11-01 00:30:27 +0100 (Mon, 01 Nov 2010)
New Revision: 11278

Added:
   trunk/src/debian/dsf-in/plugin.postinst
   trunk/src/debian/dsf-in/plugin.prerm
Log:
generic postinst and prerm


Added: trunk/src/debian/dsf-in/plugin.postinst
===================================================================
--- trunk/src/debian/dsf-in/plugin.postinst	                        (rev 0)
+++ trunk/src/debian/dsf-in/plugin.postinst	2010-10-31 23:30:27 UTC (rev 11278)
@@ -0,0 +1,67 @@
+#! /bin/sh
+# postinst script for @OLDPACKAGE at -plugin-mediawiki
+#
+# 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)
+	# Run plugin specific db upgrade
+	if [ -f /usr/share/@OLDPACKAGE@/plugins/@PLUGSHORTNAME@/bin/db-upgrade.pl ]
+	then
+		/usr/share/@OLDPACKAGE@/plugins/@PLUGSHORTNAME@/bin/db-upgrade.pl
+	fi
+	/usr/share/@OLDPACKAGE@/bin/register-plugin @PLUGSHORTNAME@ "@PLUGLONGNAME@"
+	# Restart apache if there is some change in config
+	if [ -f /etc/gforge/httpd.conf.d/plugin- at PLUGSHORTNAME@.inc ]
+	then
+		for flavour in apache apache-perl apache-ssl apache2 ; do
+			if [ -x /usr/sbin/$flavour ]; then
+				invoke-rc.d $flavour reload || true
+	   		fi
+		done
+	fi
+	# Run plugin specific install
+	if [ -f /usr/share/@OLDPACKAGE@/plugins/@PLUGSHORTNAME@/bin/install.sh ]
+	then
+		/usr/share/@OLDPACKAGE@/plugins/@PLUGSHORTNAME@/bin/install.sh configure
+	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/src/debian/dsf-in/plugin.prerm
===================================================================
--- trunk/src/debian/dsf-in/plugin.prerm	                        (rev 0)
+++ trunk/src/debian/dsf-in/plugin.prerm	2010-10-31 23:30:27 UTC (rev 11278)
@@ -0,0 +1,45 @@
+#! /bin/sh
+# prerm script for @OLDPACKAGE at -plugin-mediawiki
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# 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 @PLUGSHORTNAME@
+		if [ -f /usr/share/@OLDPACKAGE@/plugins/@PLUGSHORTNAME@/bin/db-delete.pl ]
+			/usr/share/@OLDPACKAGE@/plugins/@PLUGSHORTNAME@/bin/db-delete.pl
+		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.
+
+#DEBHELPER#
+
+exit 0
+
+




More information about the Fusionforge-commits mailing list