Harald Hoyer 308914
From cb9e6881dde7ec34e11f6f38727602d6d841a04f Mon Sep 17 00:00:00 2001
Harald Hoyer 308914
From: Derek Hageman <hageman@inthat.cloud>
Harald Hoyer 308914
Date: Thu, 30 Apr 2020 18:40:13 -0600
Harald Hoyer 308914
Subject: [PATCH] 90crypt/module-setup.sh: fix force on multiple lines
Harald Hoyer 308914
Harald Hoyer 308914
The first line in crypttab with a "force" option causes all subsequent
Harald Hoyer 308914
lines to be included as if they also had it set because the variable
Harald Hoyer 308914
used to track it is not reset between loop iterations.  So fix that by
Harald Hoyer 308914
just setting it to empty before the check for the force option.
Harald Hoyer 308914
---
Harald Hoyer 308914
 modules.d/90crypt/module-setup.sh | 1 +
Harald Hoyer 308914
 1 file changed, 1 insertion(+)
Harald Hoyer 308914
Harald Hoyer 308914
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
Harald Hoyer 308914
index 3bce2411..e3d6338f 100755
Harald Hoyer 308914
--- a/modules.d/90crypt/module-setup.sh
Harald Hoyer 308914
+++ b/modules.d/90crypt/module-setup.sh
Harald Hoyer 308914
@@ -113,6 +113,7 @@ install() {
Harald Hoyer 308914
             set -- ${luksoptions}
Harald Hoyer 308914
             IFS="${OLD_IFS}"
Harald Hoyer 308914
 
Harald Hoyer 308914
+            forceentry=""
Harald Hoyer 308914
             while [ $# -gt 0 ]; do
Harald Hoyer 308914
                 case $1 in
Harald Hoyer 308914
                     force)
Harald Hoyer 308914