From: Harald Hoyer Date: Wed, 16 Oct 2013 09:30:08 +0000 (+0200) Subject: lvm: fix thin recognition X-Git-Tag: 035~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aabea6f7b9c057571d1869c6974d4c4f42530e7e;p=thirdparty%2Fdracut.git lvm: fix thin recognition The global var setting was happening in a pipe and did not have an effect. Use <<<$() instead. < <() cannot be used, because dracut is called in chroot's environments, where /dev/fd does not point to /proc/self/fd, but bash wants /dev/fd/ for this construct. --- diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh index f8b598df5..cbdf4a256 100755 --- a/modules.d/90lvm/module-setup.sh +++ b/modules.d/90lvm/module-setup.sh @@ -57,12 +57,13 @@ install() { inst lvm if [[ $hostonly ]]; then - get_host_lvs | while read line; do + while read line; do + [[ -n "$line" ]] || continue printf "%s" " rd.lvm.lv=$line" if ! [[ $_needthin ]]; then [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1 fi - done >> "${initdir}/etc/cmdline.d/90lvm.conf" + done <<<$(get_host_lvs) >> "${initdir}/etc/cmdline.d/90lvm.conf" echo >> "${initdir}/etc/cmdline.d/90lvm.conf" else _needthin=1