summaryrefslogtreecommitdiffstats
path: root/debian/progress-linux-container.preinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 14:43:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 14:43:38 +0000
commitf8ced10e3f8a74e24e866670e2d55a53b379d7f2 (patch)
treec2929db6f9e5e6f22389c0f1947626e09b53dc4b /debian/progress-linux-container.preinst
parentAdding upstream version 20221002. (diff)
downloadprogress-linux-metapackages-debian/20221002-9.tar.xz
progress-linux-metapackages-debian/20221002-9.zip
Adding debian version 20221002-9.debian/20221002-9debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xdebian/progress-linux-container.preinst32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/progress-linux-container.preinst b/debian/progress-linux-container.preinst
new file mode 100755
index 0000000..5badcca
--- /dev/null
+++ b/debian/progress-linux-container.preinst
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ install|upgrade)
+ mkdir -p /lib/container/divert
+
+ for FILE in halt poweroff reboot shutdown coldreboot
+ do
+ dpkg-divert --package progress-linux-container --quiet --add --rename --divert /lib/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 --add --rename --divert /lib/container/divert/${FILE}.orig /usr/sbin/${FILE}
+ done
+ ;;
+
+ abort-upgrade)
+
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0