Blame 0013-dracut.sh-add-devices-with-x-initrd.mount-in-etc-fst.patch
|
Harald Hoyer |
0840a3 |
From 916559e073a49eedbc7b0c58b399d303fb8c2a05 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
0840a3 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
0840a3 |
Date: Thu, 2 Jul 2015 14:55:31 +0200
|
|
Harald Hoyer |
0840a3 |
Subject: [PATCH] dracut.sh: add devices with x-initrd.mount in /etc/fstab to
|
|
Harald Hoyer |
0840a3 |
host_devs
|
|
Harald Hoyer |
0840a3 |
|
|
Harald Hoyer |
0840a3 |
otherwise dracut might not even be able to mount those.
|
|
Harald Hoyer |
0840a3 |
---
|
|
Harald Hoyer |
0840a3 |
dracut.sh | 14 ++++++++++++++
|
|
Harald Hoyer |
0840a3 |
1 file changed, 14 insertions(+)
|
|
Harald Hoyer |
0840a3 |
|
|
Harald Hoyer |
0840a3 |
diff --git a/dracut.sh b/dracut.sh
|
|
Harald Hoyer |
0840a3 |
index 4f72b54..52383c0 100755
|
|
Harald Hoyer |
0840a3 |
--- a/dracut.sh
|
|
Harald Hoyer |
0840a3 |
+++ b/dracut.sh
|
|
Harald Hoyer |
0840a3 |
@@ -1231,6 +1231,20 @@ if [[ $hostonly ]]; then
|
|
Harald Hoyer |
0840a3 |
done < /etc/fstab
|
|
Harald Hoyer |
0840a3 |
done < /proc/swaps
|
|
Harald Hoyer |
0840a3 |
fi
|
|
Harald Hoyer |
0840a3 |
+
|
|
Harald Hoyer |
0840a3 |
+ # collect all "x-initrd.mount" entries from /etc/fstab
|
|
Harald Hoyer |
0840a3 |
+ if [[ -f /etc/fstab ]]; then
|
|
Harald Hoyer |
0840a3 |
+ while read _d _m _t _o _r || [ -n "$_d" ]; do
|
|
Harald Hoyer |
0840a3 |
+ [[ "$_d" == \#* ]] && continue
|
|
Harald Hoyer |
0840a3 |
+ [[ $_d ]] || continue
|
|
Harald Hoyer |
0840a3 |
+ [[ "$_o" != *x-initrd.mount* ]] && continue
|
|
Harald Hoyer |
0840a3 |
+ _dev=$(expand_persistent_dev "$_d")
|
|
Harald Hoyer |
0840a3 |
+ _dev="$(readlink -f "$_dev")"
|
|
Harald Hoyer |
0840a3 |
+ [[ -b $_dev ]] && push_host_devs "$_dev"
|
|
Harald Hoyer |
0840a3 |
+ done < /etc/fstab
|
|
Harald Hoyer |
0840a3 |
+ fi
|
|
Harald Hoyer |
0840a3 |
+
|
|
Harald Hoyer |
0840a3 |
+
|
|
Harald Hoyer |
0840a3 |
# record all host modaliases
|
|
Harald Hoyer |
0840a3 |
declare -A host_modalias
|
|
Harald Hoyer |
0840a3 |
find /sys/devices/ -name uevent -print > "$initdir/.modalias"
|