File kdump-use-fstab-device.patch of Package kdump.624

From: Petr Tesarik <ptesarik@suse.cz>
Date: Fri Sep 5 12:26:36 2014 +0200
Subject: Use device from /etc/fstab to mount / and /boot
References: bnc#892451
Patch-mainline: v0.8.16
Git-commit: 2895d4a8d24dd9b0a83e64cd58e464a3eaf7fe96

Since kdump_read_mounts() falls back to /proc/mounts, the root/boot
mount points must not be changed if they were found in /etc/fstab
previously.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

diff --git a/init/setup-kdump.functions b/init/setup-kdump.functions
index a676a82..2b96f8e 100644
--- a/init/setup-kdump.functions
+++ b/init/setup-kdump.functions
@@ -388,12 +388,14 @@ function kdump_get_mountpoints()					   # {{{
     kdump_opts=( )
 
     while read device mountpoint filesystem opts dummy ; do
-	if [ "$mountpoint" = "/" ] ; then
+	if [ "$mountpoint" = "/" -a \
+	     -z "$rootmnt" ] ; then
 	    rootdev="$device"
 	    rootmnt="$mountpoint"
 	    rootfstype="$filesystem"
 	    rootopts="$opts"
-	elif [ "$mountpoint" = "/boot" ] ; then
+	elif [ "$mountpoint" = "/boot" -a \
+	       -z "$bootmnt" ] ; then
 	    bootdev="$device"
 	    bootmnt="$mountpoint"
 	    bootfstype="$filesystem"