summaryrefslogtreecommitdiffstats
path: root/debian/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst31
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..bfc92e3
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,31 @@
+#!/bin/sh
+# postinst script for autopatch-util-vserver
+#
+# 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
+
+test "$1" == "configure" -o "$1" == "triggered" && {
+ mkdir -p /var/lib/autopatch-util-vserver/backup/
+ cp -a /usr/sbin/vserver /var/lib/autopatch-util-vserver/backup/vserver
+ patch -f -p 0 < /usr/share/autopatch-util-vserver/vserver-teardown.patch
+}
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0