Run invirt-reload directly in the postinst of the fooconfig packages. 1.1.20
authorEvan Broder <broder@mit.edu>
Thu, 28 Jan 2010 02:53:04 +0000 (21:53 -0500)
committerEvan Broder <broder@mit.edu>
Thu, 28 Jan 2010 02:53:04 +0000 (21:53 -0500)
This replaces the old mechanism of using triggers. Activating triggers
via a package.triggers file doesn't seem to have taken off in the
Debian/Ubuntu communities.

Instead, the standard approach seems to be to run the triggered
command as usual, and add logic to the triggered command to postpone
actually running itself until later.

svn path=/trunk/packages/xvm-prodconfig/; revision=2940

debian/changelog
debian/xvm-prodconfig.postinst [new file with mode: 0755]
debian/xvm-prodconfig.triggers [deleted file]

index adea511..8bb228a 100644 (file)
@@ -1,3 +1,9 @@
+xvm-prodconfig (1.1.20) unstable; urgency=low
+
+  * Run invirt-reload in the postinsts, not using triggers.
+
+ -- Evan Broder <broder@mit.edu>  Wed, 27 Jan 2010 21:20:08 -0500
+
 xvm-prodconfig (1.1.19) unstable; urgency=low
 
   * OpenAIS assumes that bind addresses are /24s, so actually give the
diff --git a/debian/xvm-prodconfig.postinst b/debian/xvm-prodconfig.postinst
new file mode 100755 (executable)
index 0000000..755ff9b
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+# postinst script for xvm-prodconfig
+#
+# 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>
+#        * <postinst> `abort-remove'
+#        * <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
+
+
+case "$1" in
+    configure)
+        invirt-reload
+    ;;
+
+    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
diff --git a/debian/xvm-prodconfig.triggers b/debian/xvm-prodconfig.triggers
deleted file mode 100644 (file)
index 21273fd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-activate invirt-reload