]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
parse-lvm.sh: fix for generated initqueue/finished script
authorMichal Soltys <soltys@ziu.info>
Thu, 28 Jul 2011 12:40:10 +0000 (14:40 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 28 Jul 2011 13:01:35 +0000 (15:01 +0200)
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 <soltys@ziu.info>
modules.d/90lvm/parse-lvm.sh

index 2e21d82a7e031360bf7ae901578d375495ccabcc..b85a1ace18023c25a43a33fdde27d548809effd4 100755 (executable)
@@ -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