[projects/geninitrd] luks: "none" and "-" both mean no key file

atler atler at pld-linux.org
Wed Sep 28 18:47:22 CEST 2022


commit e13a53c03ee49a40ce80ee500a72f68d5afd5759
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Sep 28 17:31:31 2022 +0200

    luks: "none" and "-" both mean no key file

 mod-luks.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/mod-luks.sh b/mod-luks.sh
index 384317d..908df0e 100644
--- a/mod-luks.sh
+++ b/mod-luks.sh
@@ -122,7 +122,7 @@ luks_crypttab() {
 	while read dst src key opt; do
 		[ "$dst" != "$LUKSNAME" ] && continue
 
-		if [ -n "$key" ] && [ "x$key" != "xnone" ]; then
+		if [ -n "$key" ] && ( [ "x$key" != "xnone" ] || [ "x$key" != "x-" ] ); then
 			if test -e "$key" ; then
 				mode=$(LC_ALL=C ls -l "$key" | cut -c 5-10)
 				owner=$(LC_ALL=C ls -l $key | awk '{ print $3 }')
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/geninitrd.git/commitdiff/ddf87c79b74022a30cec286191d31d186be184cf



More information about the pld-cvs-commit mailing list