]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
crypt: ignore devices in /etc/crypttab (root is not in there)
authorHarald Hoyer <harald@redhat.com>
Thu, 12 Nov 2009 13:56:36 +0000 (14:56 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 12 Nov 2009 13:56:36 +0000 (14:56 +0100)
modules.d/50plymouth/cryptroot-ask.sh
modules.d/90crypt/cryptroot-ask.sh

index b0599af60235d838d14f53ac58f8e0afef806daf..47dd9d834e62b5eca0b5da1318e9dc92f706b96e 100755 (executable)
@@ -16,12 +16,15 @@ luksname=$2
 if [ -f /etc/crypttab ] && ! getargs rd_NO_CRYPTTAB; then
     found=0
     while read name dev rest; do
-       cdev=$(readlink -f $dev)
-       mdev=$(readlink -f $1)
-       if [ "$cdev" = "$mdev" ]; then
-           luksname="$name"
-           break
-       fi
+        cdev=$(readlink -f $dev)
+        mdev=$(readlink -f $1)
+        if [ "$cdev" = "$mdev" ]; then
+            # for now just ignore everything which is in crypttab
+            # anaconda does not write an entry for root
+            exit 0
+            #luksname="$name"
+            #break
+    fi
     done < /etc/crypttab
 fi
 
@@ -59,4 +62,5 @@ unset LUKS
 unset ask
 unset luks
 exit 0
+# vim:ts=8:sw=4:sts=4:et
 
index 3a20d22f32b49a425d946af54862ccb5a177cf3c..b1c188949ffbbde764462f4c5f166b66b0acdaa6 100755 (executable)
@@ -18,8 +18,11 @@ if [ -f /etc/crypttab ] && ! getargs rd_NO_CRYPTTAB; then
        cdev=$(readlink -f $dev)
        mdev=$(readlink -f $1)
        if [ "$cdev" = "$mdev" ]; then
-           luksname="$name"
-           break
+            # for now just ignore everything which is in crypttab
+            # anaconda does not write an entry for root
+            exit 0
+            #luksname="$name"
+            #break
        fi
     done < /etc/crypttab
 fi