summaryrefslogtreecommitdiffstats
path: root/debian/open-infrastructure-container-tools.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/open-infrastructure-container-tools.postinst')
-rwxr-xr-xdebian/open-infrastructure-container-tools.postinst27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/open-infrastructure-container-tools.postinst b/debian/open-infrastructure-container-tools.postinst
index ee13b73..7514e29 100755
--- a/debian/open-infrastructure-container-tools.postinst
+++ b/debian/open-infrastructure-container-tools.postinst
@@ -93,6 +93,33 @@ case "${1}" in
rmdir /etc/open-infrastructure > /dev/null 2>&1 || true
fi
+ # upgrade from buster: hooks
+ for HOOK in ${HOOKS}/*
+ do
+ NAME="$(basename ${HOOK})"
+ TARGET="$(readlink -m ${HOOK})"
+
+ case "${TARGET}" in
+ /usr/share/open-infrastructure/container/hooks/pre-create.git-pull.sh)
+ rm -f "${HOOKS}/${NAME}"
+ ln -sf /usr/share/compute-tools/hooks/pre-get.git-pull.sh "${HOOKS}/pre-get.git-pull.sh"
+ ln -sf /usr/share/compute-tools/hooks/pre-build.git-pull.sh "${HOOKS}/pre-build.git-pull.sh"
+ ;;
+
+ /usr/share/open-infrastructure/container/hooks/*)
+ ln -sf "$(echo ${TARGET} | sed -e 's|/usr/share/open-infrastructure/container/hooks/|/usr/share/compute-tools/hooks/|')" "${HOOKS}/${NAME}"
+ ;;
+
+ *)
+ if [ -e "/usr/share/compute-tools/hooks/${NAME}" ]
+ then
+ rm -f "${HOOKS}/${NAME}"
+ ln -sf "/usr/share/compute-tools/hooks/${NAME}" "${HOOKS}/${NAME}"
+ fi
+ ;;
+ esac
+ done
+
# upgrade from buster: keys
if [ -e /etc/open-infrastructure/container/keys ]
then