]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
crypt: check for crypttab before reading
authorHarald Hoyer <harald@redhat.com>
Tue, 9 Jun 2015 13:05:06 +0000 (15:05 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 9 Jun 2015 13:05:32 +0000 (15:05 +0200)
modules.d/90crypt/parse-crypt.sh

index 87e674a849a079b2fd880213f3f10730e1787265..5bda006376ae1373d827493cc12065550ba540d9 100755 (executable)
@@ -14,9 +14,11 @@ else
     LUKS=$(getargs rd.luks.uuid -d rd_LUKS_UUID)
     tout=$(getarg rd.luks.key.tout)
 
-    while read _mapper _dev _rest ; do
-        set_systemd_timeout_for_dev $_dev
-    done < /etc/crypttab
+    if [ -e /etc/crypttab ]; then
+        while read _mapper _dev _rest ; do
+            set_systemd_timeout_for_dev $_dev
+        done < /etc/crypttab
+    fi
 
     if [ -n "$LUKS" ]; then
         for luksid in $LUKS; do