Blame SOURCES/0051-dracut.sh-skip-crypt-swaps-with-password-files.patch

966cef
From 6e76aee6b259c02eb23082f6f3285fa6c164b52d Mon Sep 17 00:00:00 2001
966cef
From: Harald Hoyer <harald@redhat.com>
966cef
Date: Mon, 2 Dec 2013 11:05:21 +0100
966cef
Subject: [PATCH] dracut.sh: skip crypt swaps with password files
966cef
966cef
---
966cef
 dracut.sh | 2 ++
966cef
 1 file changed, 2 insertions(+)
966cef
966cef
diff --git a/dracut.sh b/dracut.sh
966cef
index 5f14d50..b03522b 100755
966cef
--- a/dracut.sh
966cef
+++ b/dracut.sh
966cef
@@ -945,6 +945,8 @@ if [[ $hostonly ]]; then
966cef
                         [[ $_mapper = \#* ]] && continue
966cef
                         [[ "$_d" -ef /dev/mapper/"$_mapper" ]] || continue
966cef
                         [[ "$_o" ]] || _o="$_p"
966cef
+                        # skip entries with password files
966cef
+                        [[ "$_p" == /* ]] && [[ -f $_p ]] && continue 2
966cef
                         # skip mkswap swap
966cef
                         [[ $_o == *swap* ]] && continue 2
966cef
                     done < /etc/crypttab