summaryrefslogtreecommitdiff
path: root/debian/kdump-tools.preinst
diff options
context:
space:
mode:
authorThadeu Lima de Souza Cascardo <cascardo@debian.org>2018-10-16 15:30:16 -0300
committerThadeu Lima de Souza Cascardo <cascardo@debian.org>2018-10-16 15:30:16 -0300
commit545f05a3f60281ee4f6711d92ba4fae7ce9a49a4 (patch)
tree3f00322a0fe3f3aeb57498cf21f802584b9949fc /debian/kdump-tools.preinst
parentedad422003b3f542856d3d5dbf0fe0dc6727d4d4 (diff)
parent498c1f0fa3593c8246956bcfafc78eb277fae5e0 (diff)
makedumpfile (1:1.6.4-3) unstable; urgency=medium
* Reload kdump after memory/CPU hotplug. (LP: #1655280) * Fix adding crashkernel to zipl.conf when no quotation mark is used. (LP: #1790788) [dgit import unpatched makedumpfile 1:1.6.4-3]
Diffstat (limited to 'debian/kdump-tools.preinst')
-rw-r--r--debian/kdump-tools.preinst44
1 files changed, 44 insertions, 0 deletions
diff --git a/debian/kdump-tools.preinst b/debian/kdump-tools.preinst
new file mode 100644
index 0000000..7f99b11
--- /dev/null
+++ b/debian/kdump-tools.preinst
@@ -0,0 +1,44 @@
+#!/bin/sh
+# preinst script for kdump-tools
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <new-preinst> `install'
+# * <new-preinst> `install' <old-version>
+# * <new-preinst> `upgrade' <old-version>
+# * <old-preinst> `abort-upgrade' <new-version>
+# for details, see https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ install|upgrade)
+ # If in place, undo the symlink transition introduced in 1:1.5.9-6
+ oldversion="$2"
+ if [ -n "$oldversion" ] && dpkg --compare-versions $oldversion lt 1:1.6.1-2~; then
+ cfglink="/etc/default/grub.d/kdump-tools.cfg"
+ cfgtarget="/etc/default/grub.d/kdump-tools.default"
+ if [ -h "$cfglink" ] && [ "$(readlink $cfglink)" = "$cfgtarget" ]; then
+ rm "$cfglink"
+ fi
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0