summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/hooks/0030-enable-cryptsetup.hook.chroot21
1 files changed, 21 insertions, 0 deletions
diff --git a/share/hooks/0030-enable-cryptsetup.hook.chroot b/share/hooks/0030-enable-cryptsetup.hook.chroot
new file mode 100755
index 000000000..54c2978d2
--- /dev/null
+++ b/share/hooks/0030-enable-cryptsetup.hook.chroot
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+# Enable cryptsetup
+
+if [ -e /sbin/cryptsetup ]
+then
+ if [ ! -e /etc/initramfs-tools/conf.d/cryptsetup ]
+ then
+ mkdir -p /etc/initramfs-tools/conf.d
+
+cat > /etc/initramfs-tools/conf.d/cryptsetup << EOF
+# /etc/initramfs-tools/conf.d/cryptsetup
+
+CRYPTSETUP=yes
+export CRYPTSETUP
+EOF
+
+ fi
+fi