dracut/0012-90crypt-recognize-.img-as-loop-key-container.patch
Harald Hoyer 12f6cc01aa dracut-022-63.git20120727
- fixed dracut-install bug if /var/tmp contains a symlink
- fixed some partx issues
2012-07-27 06:28:40 +02:00

29 lines
979 B
Diff

From 3e9b4330a98687fe8b1f50c122bb30c42c4413ae Mon Sep 17 00:00:00 2001
From: Leho Kraav <leho@kraav.com>
Date: Tue, 24 Jul 2012 15:08:51 +0300
Subject: [PATCH] 90crypt: recognize .img as loop key container
---
modules.d/90crypt/crypt-lib.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh
index 5d0b272..3aed84d 100755
--- a/modules.d/90crypt/crypt-lib.sh
+++ b/modules.d/90crypt/crypt-lib.sh
@@ -177,6 +177,14 @@ readkey() {
die "No GPG support to decrypt '$keypath' on '$keydev'."
fi
;;
+ img)
+ if [ -f /lib/dracut-crypt-loop-lib.sh ]; then
+ . /lib/dracut-crypt-loop-lib.sh
+ loop_decrypt "$mntp" "$keypath" "$keydev" "$device"
+ else
+ die "No loop file support to decrypt '$keypath' on '$keydev'."
+ fi
+ ;;
*) cat "$mntp/$keypath" ;;
esac