diff options
-rwxr-xr-x | debian/progress-linux-container.preinst | 14 |
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 |