crypt/crypt-run-generator: also skip if UUID match in crypttab
authorHarald Hoyer <harald@redhat.com>
Mon, 12 Aug 2013 23:20:06 +0000 (01:20 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 12 Aug 2013 23:20:06 +0000 (01:20 +0200)
modules.d/90crypt/crypt-run-generator.sh
modules.d/90crypt/module-setup.sh

index 7842b3c..a610d42 100755 (executable)
@@ -8,8 +8,9 @@ dev=$1
 luks=$2
 
 if [ -f /etc/crypttab ]; then
-    while read l rest; do
+    while read l rest; do
         strstr "${l##luks-}" "${luks##luks-}" && exit 0
+        strstr "$d" "${luks##luks-}" && exit 0
     done < /etc/crypttab
 fi
 
index ac75f10..1e87559 100755 (executable)
@@ -73,10 +73,10 @@ install() {
                 fi
             done
         done < /etc/crypttab > $initdir/etc/crypttab
-    else
-        for_each_host_dev_fs check_crypt
     fi
 
+    for_each_host_dev_fs check_crypt
+
     inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
 
     inst_multiple -o \