summaryrefslogtreecommitdiffstats
path: root/test/TEST-40-NBD/cryptroot-ask.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/TEST-40-NBD/cryptroot-ask.sh')
-rwxr-xr-xtest/TEST-40-NBD/cryptroot-ask.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/TEST-40-NBD/cryptroot-ask.sh b/test/TEST-40-NBD/cryptroot-ask.sh
new file mode 100755
index 0000000..a6b7ac7
--- /dev/null
+++ b/test/TEST-40-NBD/cryptroot-ask.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ -b /dev/mapper/"$2" ] && exit 0
+printf test > /keyfile
+/sbin/cryptsetup luksOpen "$1" "$2" < /keyfile