[evolvis-commits] r16494: generic postinst and prerm↵

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Mar 1 01:21:03 CET 2011


Author: mirabilos
Date: 2011-03-01 01:21:03 +0100 (Tue, 01 Mar 2011)
New Revision: 16494

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


Added: trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin.postinst
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin.postinst	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin.postinst	2011-03-01 00:21:03 UTC (rev 16494)
@@ -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/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin.prerm
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin.prerm	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/dsf-in/plugin.prerm	2011-03-01 00:21:03 UTC (rev 16494)
@@ -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 evolvis-commits mailing list