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

Collapse All | Expand All

(-)initrd.scripts.orig (-1 / +32 lines)
Lines 492-498 Link Here
492
492
493
	# Here, we check for /dev/device-mapper, and if it exists, we setup a
493
	# Here, we check for /dev/device-mapper, and if it exists, we setup a
494
	# a symlink, which should hopefully fix bug #142775 and bug #147015
494
	# a symlink, which should hopefully fix bug #142775 and bug #147015
495
	if [ -e /dev/device-mapper ]
495
	if [ -e /dev/device-mapper ] && [ ! -e /dev/mapper/control ]
496
	then
496
	then
497
		mkdir -p /dev/mapper
497
		mkdir -p /dev/mapper
498
		ln -sf /dev/device-mapper /dev/mapper/control
498
		ln -sf /dev/device-mapper /dev/mapper/control
Lines 549-554 Link Here
549
	fi
549
	fi
550
}
550
}
551
551
552
startLUKS() {
553
	if [ -n "${LUKS_ROOT}" ]
554
	then
555
		if [ -e /sbin/cryptsetup ]
556
		then
557
			if cryptsetup isLuks ${LUKS_ROOT}
558
			then
559
				good_msg "Opening LUKS device ${LUKS_ROOT}"
560
561
				cryptsetup luksOpen ${LUKS_ROOT} root
562
				if [ ! "$?" -eq '0' ]
563
				then
564
					bad_msg "Failed open LUKS device ${LUKS_ROOT}"
565
				fi
566
567
				if [ -n "${REAL_ROOT}" ]
568
				then
569
					# Rescan volumes
570
					startVolumes
571
				else
572
					REAL_ROOT="/dev/mapper/root"
573
				fi
574
			else
575
				bad_msg "The LUKS device ${LUKS_ROOT} does not contain a LUKS hearder"
576
			fi
577
		else
578
			bad_msg "The initrd does not support LUKS"
579
		fi
580
	fi
581
}
582
552
sdelay() {
583
sdelay() {
553
	# Sleep a specific number of seconds if SDELAY is set otherwise only sleep
584
	# Sleep a specific number of seconds if SDELAY is set otherwise only sleep
554
	# 1 second
585
	# 1 second

Return to bug 152441