|
Harald Hoyer |
932373 |
From aabea6f7b9c057571d1869c6974d4c4f42530e7e Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
932373 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
932373 |
Date: Wed, 16 Oct 2013 11:30:08 +0200
|
|
Harald Hoyer |
932373 |
Subject: [PATCH] lvm: fix thin recognition
|
|
Harald Hoyer |
932373 |
|
|
Harald Hoyer |
932373 |
The global var setting was happening in a pipe and did not have an
|
|
Harald Hoyer |
932373 |
effect.
|
|
Harald Hoyer |
932373 |
|
|
Harald Hoyer |
932373 |
Use <<<$() instead.
|
|
Harald Hoyer |
932373 |
|
|
Harald Hoyer |
932373 |
< <() cannot be used, because dracut is called in chroot's environments,
|
|
Harald Hoyer |
932373 |
where /dev/fd does not point to /proc/self/fd, but bash wants
|
|
Harald Hoyer |
932373 |
/dev/fd/<num> for this construct.
|
|
Harald Hoyer |
932373 |
---
|
|
Harald Hoyer |
932373 |
modules.d/90lvm/module-setup.sh | 5 +++--
|
|
Harald Hoyer |
932373 |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
Harald Hoyer |
932373 |
|
|
Harald Hoyer |
932373 |
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
932373 |
index f8b598d..cbdf4a2 100755
|
|
Harald Hoyer |
932373 |
--- a/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
932373 |
+++ b/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
932373 |
@@ -57,12 +57,13 @@ install() {
|
|
Harald Hoyer |
932373 |
inst lvm
|
|
Harald Hoyer |
932373 |
|
|
Harald Hoyer |
932373 |
if [[ $hostonly ]]; then
|
|
Harald Hoyer |
932373 |
- get_host_lvs | while read line; do
|
|
Harald Hoyer |
932373 |
+ while read line; do
|
|
Harald Hoyer |
932373 |
+ [[ -n "$line" ]] || continue
|
|
Harald Hoyer |
932373 |
printf "%s" " rd.lvm.lv=$line"
|
|
Harald Hoyer |
932373 |
if ! [[ $_needthin ]]; then
|
|
Harald Hoyer |
932373 |
[[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1
|
|
Harald Hoyer |
932373 |
fi
|
|
Harald Hoyer |
932373 |
- done >> "${initdir}/etc/cmdline.d/90lvm.conf"
|
|
Harald Hoyer |
932373 |
+ done <<<$(get_host_lvs) >> "${initdir}/etc/cmdline.d/90lvm.conf"
|
|
Harald Hoyer |
932373 |
echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
|
|
Harald Hoyer |
932373 |
else
|
|
Harald Hoyer |
932373 |
_needthin=1
|