summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2014-11-10 19:57:33 +0100
committerDaniel Baumann <mail@daniel-baumann.ch>2014-11-10 19:57:33 +0100
commitef03f67f817a9485f61975480985588db9cd6ea0 (patch)
tree70f98a6cde5c0705fde5781fc0047fb718b6521b /share
parent61a166adea60c8f5500f7d2e300f84807b9b17ac (diff)
downloadvyos-live-build-ef03f67f817a9485f61975480985588db9cd6ea0.tar.gz
vyos-live-build-ef03f67f817a9485f61975480985588db9cd6ea0.zip
Adding hook to enable cryptsetup (Closes: #767195).
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