summaryrefslogtreecommitdiffstats
path: root/debian/hyperv-daemons.preinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:28:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:28:00 +0000
commit3565071f226432336a54d0193d729fa4508a3394 (patch)
tree4cde13f078f84c0a7785d234fd52edce7c90546a /debian/hyperv-daemons.preinst
parentAdding upstream version 6.6.15. (diff)
downloadlinux-3565071f226432336a54d0193d729fa4508a3394.tar.xz
linux-3565071f226432336a54d0193d729fa4508a3394.zip
Adding debian version 6.6.15-2.debian/6.6.15-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/hyperv-daemons.preinst')
-rw-r--r--debian/hyperv-daemons.preinst17
1 files changed, 17 insertions, 0 deletions
diff --git a/debian/hyperv-daemons.preinst b/debian/hyperv-daemons.preinst
new file mode 100644
index 0000000000..5810d29468
--- /dev/null
+++ b/debian/hyperv-daemons.preinst
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "upgrade" ]; then
+ for i in fcopy kvp vss; do
+ if [ -d /run/systemd/system ]; then
+ systemctl stop hyperv-daemons.hv-$i-daemon.service 2>/dev/null || true
+ fi
+ deb-systemd-helper purge hyperv-daemons.hv-$i-daemon.service || true
+ invoke-rc.d --skip-systemd-native hyperv-daemons.hv-$i-daemon stop || true
+ update-rc.d hyperv-daemons.hv-$i-daemon remove || true
+ done
+fi
+
+#DEBHELPER#
+
+exit 0