From 603acfdf9ff66fc3cff44550c3443954d3a437f5 Mon Sep 17 00:00:00 2001
From: Evan Broder <broder@mit.edu>
Date: Wed, 27 Jan 2010 21:53:04 -0500
Subject: [PATCH] Run invirt-reload directly in the postinst of the fooconfig
 packages.

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               |    6 ++++++
 debian/xvm-prodconfig.postinst |   40 ++++++++++++++++++++++++++++++++++++++++
 debian/xvm-prodconfig.triggers |    1 -
 3 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100755 debian/xvm-prodconfig.postinst
 delete mode 100644 debian/xvm-prodconfig.triggers

diff --git a/debian/changelog b/debian/changelog
index adea511..8bb228a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
index 0000000..755ff9b
--- /dev/null
+++ b/debian/xvm-prodconfig.postinst
@@ -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
index 21273fd..0000000
--- a/debian/xvm-prodconfig.triggers
+++ /dev/null
@@ -1 +0,0 @@
-activate invirt-reload
-- 
1.7.9.5