The script that was generated always returned the status of the last test
condition, potentially missing any earlier non-existing devices.

The change assures, that the script returns 0 only if all expected
devices are found.

Signed-off-by: Michal Soltys <[email protected]>
---
 modules.d/90lvm/parse-lvm.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules.d/90lvm/parse-lvm.sh b/modules.d/90lvm/parse-lvm.sh
index 2e21d82..b85a1ac 100755
--- a/modules.d/90lvm/parse-lvm.sh
+++ b/modules.d/90lvm/parse-lvm.sh
@@ -10,7 +10,7 @@ if ! getargbool 1 rd.lvm -n rd_NO_LVM; then
     rm -f /etc/udev/rules.d/64-lvm*.rules
 else
     for dev in $(getargs rd.lvm.vg rd_LVM_VG=) $(getargs rd.lvm.lv 
rd_LVM_LV=); do
-        printf '[ -e "/dev/%s" ]\n' $dev \
+        printf '[ -e "/dev/%s" ] || return 1\n' $dev \
             >> $hookdir/initqueue/finished/lvm.sh
         {
             printf '[ -e "/dev/%s" ] || ' $dev
-- 
1.7.5.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to