]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut.sh: skip crypt swaps with password files
authorHarald Hoyer <harald@redhat.com>
Mon, 2 Dec 2013 10:05:21 +0000 (11:05 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 3 Dec 2013 15:21:04 +0000 (16:21 +0100)
dracut.sh

index 177b81331cd7988e0f3366db9f2fa297ac0110ee..6975d90ea6fbcf313109f4b806f891ee7a5610cb 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -947,6 +947,8 @@ if [[ $hostonly ]]; then
                         [[ $_mapper = \#* ]] && continue
                         [[ "$_d" -ef /dev/mapper/"$_mapper" ]] || continue
                         [[ "$_o" ]] || _o="$_p"
+                        # skip entries with password files
+                        [[ "$_p" == /* ]] && [[ -f $_p ]] && continue 2
                         # skip mkswap swap
                         [[ $_o == *swap* ]] && continue 2
                     done < /etc/crypttab