kdump/kdump-use-fstab-device.patch
Petr Tesařík e70a9890cd Accepting request 247697 from home:ptesarik:branches:Kernel:kdump
- kdump-use-fstab-device.patch: Use device from /etc/fstab to mount
  / and /boot (bnc#892451).

OBS-URL: https://build.opensuse.org/request/show/247697
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=103
2014-09-05 12:07:14 +00:00

35 lines
1.1 KiB
Diff

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"