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

(-)dmcrypt.orig (-4 / +4 lines)
Lines 96-103 Link Here
96
		}
96
		}
97
97
98
		# Notes: sed not used to avoid case where /usr partition is encrypted.
98
		# Notes: sed not used to avoid case where /usr partition is encrypted.
99
		mode=${key/*:/} && ( [ "${mode}" = "${key}" ] || [ -z "${mode}" ] ) && mode=reg
99
		mode=${key##*:} && ( [ "${mode}" = "${key}" ] || [ -z "${mode}" ] ) && mode=reg
100
		key=${key/:*/}
100
		key=${key%%:*}
101
		case "${mode}" in
101
		case "${mode}" in
102
		gpg|reg)
102
		gpg|reg)
103
			# handle key on removable device
103
			# handle key on removable device
Lines 155-161 Link Here
155
	if [ "${mode}" = "gpg" ] ; then
155
	if [ "${mode}" = "gpg" ] ; then
156
		: ${gpg_options:='-q -d'}
156
		: ${gpg_options:='-q -d'}
157
		# gpg available ?
157
		# gpg available ?
158
		if type -p gpg >/dev/null ; then
158
		if command -v gpg >/dev/null ; then
159
			for i in 0 1 2 ; do
159
			for i in 0 1 2 ; do
160
				# paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected.
160
				# paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected.
161
				# save stdin stdout stderr "values"
161
				# save stdin stdout stderr "values"
Lines 255-261 Link Here
255
		esac
255
		esac
256
	done
256
	done
257
257
258
	while read -u 3 targetline ; do
258
	while read <&3 targetline ; do
259
		case ${targetline} in
259
		case ${targetline} in
260
		# skip comments and blank lines
260
		# skip comments and blank lines
261
		""|"#"*) continue ;;
261
		""|"#"*) continue ;;

Return to bug 451460