summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2016-06-01 14:03:42 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2016-06-01 14:03:42 +0000
commit23cd3dcb4a3bcbf4653cab1b27664fa2a34ff6c7 (patch)
tree1f57aaff236de7fcb00cd19d54d7efa5e3110521
parentUpdating homepage field. (diff)
downloadopen-infrastructure-compute-tools-23cd3dcb4a3bcbf4653cab1b27664fa2a34ff6c7.tar.xz
open-infrastructure-compute-tools-23cd3dcb4a3bcbf4653cab1b27664fa2a34ff6c7.zip
Managing /usr/share/container-tools/scripts/default symlink via update-alternatives.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
-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