]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
90crypt/module-setup.sh: fix force on multiple lines
authorDerek Hageman <hageman@inthat.cloud>
Fri, 1 May 2020 00:40:13 +0000 (18:40 -0600)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 1 May 2020 09:43:47 +0000 (11:43 +0200)
The first line in crypttab with a "force" option causes all subsequent
lines to be included as if they also had it set because the variable
used to track it is not reset between loop iterations.  So fix that by
just setting it to empty before the check for the force option.

modules.d/90crypt/module-setup.sh

index 3bce24113f279a1d7dd4af82e9c12c989d136372..e3d6338f182c1c60550d295c9209dd4f08f58fc6 100755 (executable)
@@ -113,6 +113,7 @@ install() {
             set -- ${luksoptions}
             IFS="${OLD_IFS}"
 
+            forceentry=""
             while [ $# -gt 0 ]; do
                 case $1 in
                     force)