summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-12 14:08:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-12 14:08:12 +0000
commitfd1bfbe64a4954ef061a1f2c9512b8b35c0d2c47 (patch)
treee1b0dc2e8253a14e3864b5f689976e657e973db6
parentReleasing debian version 20221002-9. (diff)
downloadprogress-linux-metapackages-fd1bfbe64a4954ef061a1f2c9512b8b35c0d2c47.tar.xz
progress-linux-metapackages-fd1bfbe64a4954ef061a1f2c9512b8b35c0d2c47.zip
Removing previous diversions when upgrading from bullseye in progress-linux-container (Closes: #1035604).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rwxr-xr-xdebian/progress-linux-container.preinst14
1 files changed, 14 insertions, 0 deletions
diff --git a/debian/progress-linux-container.preinst b/debian/progress-linux-container.preinst
index 5badcca..ed41ccc 100755
--- a/debian/progress-linux-container.preinst
+++ b/debian/progress-linux-container.preinst
@@ -4,6 +4,20 @@ set -e
case "${1}" in
install|upgrade)
+ # upgrade from bullseye
+ if ls /lib/open-infrastructure/container/divert/*.orig > /dev/null 2>&1
+ then
+ for FILE in halt poweroff reboot shutdown coldreboot
+ do
+ dpkg-divert --package progress-linux-container --quiet --remove --rename --divert /lib/open-infrastructure/container/divert/${FILE}.orig /sbin/${FILE}
+ done
+
+ for FILE in pm-hibernate pm-suspend pm-suspend-hybrid
+ do
+ dpkg-divert --package progress-linux-container --quiet --remove --rename --divert /lib/open-infrastructure/container/divert/${FILE}.orig /usr/sbin/${FILE}
+ done
+ fi
+
mkdir -p /lib/container/divert
for FILE in halt poweroff reboot shutdown coldreboot