summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/open-infrastructure-container-tools.postinst24
-rw-r--r--debian/open-infrastructure-container-tools.prerm24
2 files changed, 48 insertions, 0 deletions
diff --git a/debian/open-infrastructure-container-tools.postinst b/debian/open-infrastructure-container-tools.postinst
new file mode 100644
index 0000000..679190e
--- /dev/null
+++ b/debian/open-infrastructure-container-tools.postinst
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ configure)
+ update-alternatives --quiet --install /usr/share/container-tools/scripts/default container-tools_script /usr/share/container-tools/scripts/debootstrap 1000
+ update-alternatives --quiet --install /usr/share/container-tools/scripts/default container-tools_script /usr/share/container-tools/scripts/debian 3000
+ update-alternatives --quiet --install /usr/share/container-tools/scripts/default container-tools_script /usr/share/container-tools/scripts/progress-linux 2000
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/open-infrastructure-container-tools.prerm b/debian/open-infrastructure-container-tools.prerm
new file mode 100644
index 0000000..2a18330
--- /dev/null
+++ b/debian/open-infrastructure-container-tools.prerm
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ remove|upgrade|deconfigure)
+ update-alternatives --quiet --remove container-tools_script /usr/share/container-tools/scripts/debootstrap
+ update-alternatives --quiet --remove container-tools_script /usr/share/container-tools/scripts/debian
+ update-alternatives --quiet --remove container-tools_script /usr/share/container-tools/scripts/progress-linux
+ ;;
+
+ failed-upgrade)
+
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0