summaryrefslogtreecommitdiffstats
path: root/system-build/share/hooks/normal/0030-enable-cryptsetup.hook.chroot
blob: 54c2978d21de8f0ef6928aa020f4ba4a2728f929 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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