View | Details | Raw Unified | Return to bug 28082
Collapse All | Expand All

(-)a/features/luks/config.mk (-1 / +2 lines)
Lines 1-6 Link Here
1
CRYPTSETUP_BIN		?= /usr/sbin/cryptsetup
1
CRYPTSETUP_BIN		?= /usr/sbin/cryptsetup
2
CRYPTTAB_FILE		?= /etc/crypttab
2
LUKS_DATADIR		?= $(FEATURESDIR)/luks/data
3
LUKS_DATADIR		?= $(FEATURESDIR)/luks/data
3
LUKS_CIPHERS		?= aes
4
LUKS_CIPHERS		?= aes
4
LUKS_BLOCKCIPHERS	?= cbc
5
LUKS_BLOCKCIPHERS	?= cbc
5
LUKS_HASHES		?= sha256
6
LUKS_HASHES		?= sha256
6
LUKS_MODULES		 = dm-crypt $(LUKS_CIPHERS) $(LUKS_BLOCKCIPHERS) $(LUKS_HASHES)
7
LUKS_MODULES		 = dm-crypt $(LUKS_CIPHERS) $(LUKS_BLOCKCIPHERS) $(LUKS_HASHES)
(-)a/features/luks/data/lib/handlers/050-luks (+10 lines)
Lines 55-60 readkey() { Link Here
55
handler() {
55
handler() {
56
	nameluks="${LUKS_ROOT##*/}-luks"
56
	nameluks="${LUKS_ROOT##*/}-luks"
57
57
58
	if [ -r /etc/crypttab ]; then
59
		LUKS_ROOT_UUID=$(blkid -o value -s UUID "$LUKS_ROOT")
60
		while read crypttab_name crypttab_block crypttab_specifies crypttab_options; do
61
			if [ x"$crypttab_block" = x"$LUKS_ROOT" ] || [ x"$crypttab_block" = x"UUID=$LUKS_ROOT_UUID" ]; then
62
				nameluks=$crypttab_name
63
				break
64
			fi
65
		done < /etc/crypttab
66
	fi
67
58
	# skip if $nameluks has already exist
68
	# skip if $nameluks has already exist
59
	! dmsetup info "$nameluks" >/dev/null 2>&1 ||
69
	! dmsetup info "$nameluks" >/dev/null 2>&1 ||
60
		exit 0
70
		exit 0
(-)a/features/luks/rules.mk (+1 lines)
Lines 5-10 $(call require,devmapper,depmod-image) Link Here
5
luks: devmapper
5
luks: devmapper
6
	@echo "Adding LUKS support ..."
6
	@echo "Adding LUKS support ..."
7
	@put-file "$(ROOTDIR)" $(CRYPTSETUP_BIN)
7
	@put-file "$(ROOTDIR)" $(CRYPTSETUP_BIN)
8
	@put-file "$(ROOTDIR)" $(CRYPTTAB_FILE)
8
	@put-tree "$(ROOTDIR)" $(LUKS_DATADIR)
9
	@put-tree "$(ROOTDIR)" $(LUKS_DATADIR)
9
10
10
depmod-image: luks
11
depmod-image: luks

Return to bug 28082