Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 193546
Collapse All | Expand All

(-)1.0.5-dm-crypt-start.sh.orig (-2 / +12 lines)
Lines 24-30 Link Here
24
		# swap contents do not need to be preserved between boots, luks not required.
24
		# swap contents do not need to be preserved between boots, luks not required.
25
		# suspend2 users should have initramfs's init handling their swap partition either way.
25
		# suspend2 users should have initramfs's init handling their swap partition either way.
26
		: ${options:='-c aes -h sha1 -d /dev/urandom'}
26
		: ${options:='-c aes -h sha1 -d /dev/urandom'}
27
		: ${pre_mount:='mkswap ${dev}'}
27
		if [ -n "$header" ]; then
28
			options="-o 1 ${options}"
29
			if [ "$header" == "`/bin/dd if=${source} bs=1 count=${#header} 2> /dev/null`" ]; then
30
				: ${pre_mount:='mkswap ${dev}'}
31
			else
32
				ewarn "Swap header verification failed, not running mkswap on ${source}"
33
				return
34
			fi
35
		else
36
			: ${pre_mount:='mkswap ${dev}'}
37
		fi
28
	else
38
	else
29
		return
39
		return
30
	fi
40
	fi
Lines 218-224 Link Here
218
				unset gpg_options key loop_file target options pre_mount post_mount source swap remdev
228
				unset gpg_options key loop_file target options pre_mount post_mount source swap remdev
219
				;;
229
				;;
220
230
221
			gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*)
231
			gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*|header=*)
222
				if [[ -z ${target} && -z ${swap} ]] ; then
232
				if [[ -z ${target} && -z ${swap} ]] ; then
223
					ewarn "Ignoring setting outside target/swap section: ${targetline}"
233
					ewarn "Ignoring setting outside target/swap section: ${targetline}"
224
					continue
234
					continue

Return to bug 193546