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

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