From 159288cd7ba4c0d3e24c89857efcc0a56d716fa7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Nov 2021 16:31:42 +0100 Subject: Adding upgrade-handling for logfiles from buster to bullseye and newer. Signed-off-by: Daniel Baumann --- debian/open-infrastructure-container-tools.postinst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debian/open-infrastructure-container-tools.postinst b/debian/open-infrastructure-container-tools.postinst index 39dd01b..ee13b73 100755 --- a/debian/open-infrastructure-container-tools.postinst +++ b/debian/open-infrastructure-container-tools.postinst @@ -102,6 +102,18 @@ case "${1}" in rmdir -p /etc/open-infrastructure/container > /dev/null 2>&1 || true fi + # upgrade from buster: logfiles + if ls /var/log/open-infrastructure/container.log* > /dev/null 2>&1 + then + if [ -e /var/log/compute-tools ] + then + mv /var/log/open-infrastructure/* /var/log/compute-tools 2>&1 || true + rmdir /var/log/open-infrastructure > /dev/null 2>&1 || true + else + mv /var/log/open-infrastructure /var/log/compute-tools + fi + fi + if [ ! -e "${CONFFILE}" ] then -- cgit v1.2.3