SVN: geninitrd/trunk/mod-luks.sh

glen glen at pld-linux.org
Wed Jan 20 17:37:03 CET 2010


Author: glen
Date: Wed Jan 20 17:37:03 2010
New Revision: 11115

Modified:
   geninitrd/trunk/mod-luks.sh
Log:
- if "cryptsetup status" returns no device, assume there is no cryptsetup

Modified: geninitrd/trunk/mod-luks.sh
==============================================================================
--- geninitrd/trunk/mod-luks.sh	(original)
+++ geninitrd/trunk/mod-luks.sh	Wed Jan 20 17:37:03 2010
@@ -43,8 +43,12 @@
 	fi
 
 	dev=$(/sbin/cryptsetup status $dm_name 2>/dev/null | awk '/device:/{print $2}')
-	/sbin/cryptsetup isLuks $dev
-	rc=$?
+	if [ "$dev" ]; then
+		/sbin/cryptsetup isLuks $dev
+		rc=$?
+	else
+		rc=1
+	fi
 
 	if [ $rc = 0 ]; then
 		debug "is_luks: $node is cryptsetup luks"


More information about the pld-cvs-commit mailing list