Package: kdump-tools
Version: 1:1.6.0-2
Severity: important
Tags: patch

Dear Maintainer,

kdump-config fails to load kdump kernel on my machine, most probably because
of double quotes (") in kernel command line. I have to add
"acpi_osi=!Windows 2012" there to fix backlight issues, and that makes
`kdump-config load` fail.

I propose to escape double quotes in string read from /proc/cmdline
(patch included). That fixes issue on my setup.


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=ru_RU.utf8, LC_CTYPE=ru_RU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages kdump-tools depends on:
ii  bsdmainutils           9.0.10
ii  debconf [debconf-2.0]  1.5.59
ii  init-system-helpers    1.42
ii  kexec-tools            1:2.0.12-1
ii  makedumpfile           1:1.6.0-2

kdump-tools recommends no packages.

kdump-tools suggests no packages.

-- Configuration Files:
/etc/default/kdump-tools changed [not included]

-- debconf information:
* kdump-tools/use_kdump: true
diff -ur makedumpfile-1.6.0.orig/debian/kdump-config makedumpfile-1.6.0/debian/kdump-config
--- makedumpfile-1.6.0.orig/debian/kdump-config	2016-07-12 18:34:37.000000000 +0300
+++ makedumpfile-1.6.0/debian/kdump-config	2016-08-27 16:13:22.228629809 +0300
@@ -524,7 +524,8 @@
 	if [ -z "$KDUMP_CMDLINE" ] ; then
 		KDUMP_CMDLINE=`cat /proc/cmdline | \
 		sed -r -e 's/(^| )crashkernel=[^ ]*//g' \
-		       -e 's/(^| )abm=[^ ]*//g'`
+		       -e 's/(^| )abm=[^ ]*//g' \
+		       -e 's/"/\\\\"/'g`
 	fi
 	KDUMP_CMDLINE="$KDUMP_CMDLINE $KDUMP_CMDLINE_APPEND"
 	KEXEC_CMD="$KEXEC_CMD --command-line=\"$KDUMP_CMDLINE\""

Reply via email to