summaryrefslogtreecommitdiffstats
path: root/debian/kinet-container.preinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-29 06:27:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-29 06:27:41 +0000
commitd2e88cf2399110e878618103aefd00da3c1e90fc (patch)
tree6b3021567d8216d2590dd2b4c87dcbfcf0d5c95a /debian/kinet-container.preinst
parentReleasing version 20230327. (diff)
downloadkinet-metapackages-debian.tar.xz
kinet-metapackages-debian.zip
Adding debian version 20230327-1.HEADdebian/20230327-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/kinet-container.preinst')
-rwxr-xr-xdebian/kinet-container.preinst32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/kinet-container.preinst b/debian/kinet-container.preinst
new file mode 100755
index 0000000..4ef28f7
--- /dev/null
+++ b/debian/kinet-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 kinet-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 kinet-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