56 lines
1.5 KiB
Diff
56 lines
1.5 KiB
Diff
|
From be3797f733ad5e956c73d0f17ba8bddc12b7f570 Mon Sep 17 00:00:00 2001
|
||
|
From: Thomas Renninger <trenn@suse.de>
|
||
|
Date: Fri, 22 Aug 2014 18:52:22 +0200
|
||
|
Subject: dracut.sh: Fix UUID= fstab parsing in case --mount option is passed
|
||
|
|
||
|
Dracut parses /etc/fstab when --mount is option is passed (e.g. kdump).
|
||
|
|
||
|
In host_devs variable the real block device must be stored, not UUID=
|
||
|
There are other /etc/fstab syntax possibilities we now warn that they
|
||
|
are not correctly parsed. This will be fixed by another patch
|
||
|
when there is time to test this properly.
|
||
|
|
||
|
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||
|
---
|
||
|
dracut.sh | 23 +++++++++++++++++++++--
|
||
|
1 files changed, 21 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/dracut.sh b/dracut.sh
|
||
|
index 297c6bf..d087530 100755
|
||
|
--- a/dracut.sh
|
||
|
+++ b/dracut.sh
|
||
|
@@ -1020,9 +1020,28 @@ declare -A host_fs_types
|
||
|
|
||
|
for line in "${fstab_lines[@]}"; do
|
||
|
set -- $line
|
||
|
+ dev="$1"
|
||
|
#dev mp fs fsopts
|
||
|
- push_host_devs "$1"
|
||
|
- host_fs_types["$1"]="$3"
|
||
|
+ case "$dev" in
|
||
|
+ UUID=*)
|
||
|
+ dev=/dev/disk/by-uuid/${dev#UUID=*}
|
||
|
+ ;;
|
||
|
+ LABEL=*)
|
||
|
+ dwarn "Not supported fstab line: $@"
|
||
|
+ ;;
|
||
|
+ PARTUUID=*)
|
||
|
+ dwarn "Not supported fstab line: $@"
|
||
|
+ ;;
|
||
|
+ PARTLABEL=*)
|
||
|
+ dwarn "Not supported fstab line: $@"
|
||
|
+ ;;
|
||
|
+ *)
|
||
|
+ dwarn "Not supported fstab line: $@"
|
||
|
+ ;;
|
||
|
+ esac
|
||
|
+ push_host_devs "$dev"
|
||
|
+ echo "$dev" "$3"
|
||
|
+ host_fs_types["$dev"]="$3"
|
||
|
done
|
||
|
|
||
|
for f in $add_fstab; do
|
||
|
--
|
||
|
1.7.6.1
|
||
|
|