Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 315467 | Differences between
and this patch

Collapse All | Expand All

(-)a/defaults/initrd.scripts (-8 / +7 lines)
Lines 762-787 openLUKS() { Link Here
762
			KEYDEV_ERROR=0
762
			KEYDEV_ERROR=0
763
		else
763
		else
764
			case "${LUKS_DEVICE}" in
764
			case "${LUKS_DEVICE}" in
765
				UUID\=*)
765
				UUID\=*|LABEL\=*)
766
					REAL_LUKS=""
766
					local REAL_LUKS=""
767
					retval=1
767
					local retval=1
768
768
769
					if [ "${retval}" -ne '0' ]; then
769
					if [ "${retval}" -ne 0 ]; then
770
						REAL_LUKS=`findfs "${LUKS_DEVICE}" 2>/dev/null`
770
						REAL_LUKS=`findfs "${LUKS_DEVICE}" 2>/dev/null`
771
						retval=$?
771
						retval=$?
772
					fi
772
					fi
773
773
774
					if [ "$retval" -ne '0' ]; then
774
					if [ "$retval" -ne 0 ]; then
775
						REAL_LUKS=`busybox findfs "${LUKS_DEVICE}" 2>/dev/null`
775
						REAL_LUKS=`busybox findfs "${LUKS_DEVICE}" 2>/dev/null`
776
						retval=$?
776
						retval=$?
777
					fi
777
					fi
778
778
779
					if [ "${retval}" -ne '0' ]; then
779
					if [ "${retval}" -ne 0 ]; then
780
						REAL_LUKS=`blkid -t "${LUKS_DEVICE}" | cut -d ":" -f 1 2>/dev/null`
780
						REAL_LUKS=`blkid -t "${LUKS_DEVICE}" | cut -d ":" -f 1 2>/dev/null`
781
						retval=$?
781
						retval=$?
782
					fi
782
					fi
783
783
784
					if [ "${retval}" -eq '0' ] && [ -n "${REAL_LUKS}" ]; then
784
					if [ "${retval}" -eq 0 ] && [ -n "${REAL_LUKS}" ]; then
785
						good_msg "Detected device ${REAL_LUKS}"
785
						good_msg "Detected device ${REAL_LUKS}"
786
						LUKS_DEVICE="${REAL_LUKS}"
786
						LUKS_DEVICE="${REAL_LUKS}"
787
					fi
787
					fi
788
- 

Return to bug 315467