summaryrefslogtreecommitdiffstats
path: root/system-build/share/hooks/normal/0030-enable-cryptsetup.hook.chroot
diff options
context:
space:
mode:
Diffstat (limited to 'system-build/share/hooks/normal/0030-enable-cryptsetup.hook.chroot')
-rwxr-xr-xsystem-build/share/hooks/normal/0030-enable-cryptsetup.hook.chroot21
1 files changed, 21 insertions, 0 deletions
diff --git a/system-build/share/hooks/normal/0030-enable-cryptsetup.hook.chroot b/system-build/share/hooks/normal/0030-enable-cryptsetup.hook.chroot
new file mode 100755
index 0000000..54c2978
--- /dev/null
+++ b/system-build/share/hooks/normal/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