[Pkg-loop-aes-commits] r1326 - /trunk/loop-aes-utils/debian/loop-aes-keygen

xam at users.alioth.debian.org xam at users.alioth.debian.org
Sat Nov 18 15:03:56 CET 2006


Author: xam
Date: Sat Nov 18 15:03:56 2006
New Revision: 1326

URL: http://svn.debian.org/wsvn/pkg-loop-aes/?sc=1&rev=1326
Log:
Add warning if chosen key type is not supported by losetup

Modified:
    trunk/loop-aes-utils/debian/loop-aes-keygen

Modified: trunk/loop-aes-utils/debian/loop-aes-keygen
URL: http://svn.debian.org/wsvn/pkg-loop-aes/trunk/loop-aes-utils/debian/loop-aes-keygen?rev=1326&op=diff
==============================================================================
--- trunk/loop-aes-utils/debian/loop-aes-keygen (original)
+++ trunk/loop-aes-utils/debian/loop-aes-keygen Sat Nov 18 15:03:56 2006
@@ -137,6 +137,11 @@
 	return 0
 }
 
+check_multikey_support ()
+{
+	strings /sbin/losetup | grep -q -s multi-key-v$1
+}
+
 keygen()
 {
 	version=$1
@@ -174,6 +179,12 @@
 	exit 1
 fi
 
+if [ "$version" -gt 1 ] && [ -x /usr/bin/strings ]; then
+	if ! check_multikey_support $version; then
+		echo "Warning: /sbin/losetup too old for v$version keys."
+	fi
+fi
+
 if [ -e $keyfile ]; then
 	echo "Keyfile $keyfile exists. Aborting."
 	exit 1




More information about the Pkg-loop-aes-commits mailing list