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

Collapse All | Expand All

(-)genkernel/trunk/generic/initrd.scripts (-3 / +2 lines)
Lines 111-121 Link Here
111
                                good_msg "Attempting to mount key media:- ${x}"
111
                                good_msg "Attempting to mount key media:- ${x}"
112
                                mount -r -t auto ${x} ${NEW_ROOT}/mnt/key \
112
                                mount -r -t auto ${x} ${NEW_ROOT}/mnt/key \
113
                                                > /dev/null 2>&1
113
                                                > /dev/null 2>&1
114
                                fi
115
                                if [ "$?" = '0' ]
114
                                if [ "$?" = '0' ]
116
                                then
115
                                then
117
                                        # Check for the key
116
                                        # Check for the key
118
                                        if [ -e ${NEW_ROOT}/mnt/key/${SUBDIR}/${KEYNAME} ]
117
                                        if [ -e ${NEW_ROOT}/mnt/key/${KEYNAME} ]
119
                                        then
118
                                        then
120
                                                KEY_ROOT="${x}"
119
                                                KEY_ROOT="${x}"
121
                                                break
120
                                                break
Lines 401-407 Link Here
401
        # USB using the USB Block Driver
400
        # USB using the USB Block Driver
402
        KEYDEVS="${KEYDEVS} /dev/ubd* /dev/ubd/*"
401
        KEYDEVS="${KEYDEVS} /dev/ubd* /dev/ubd/*"
403
        # iSeries devices
402
        # iSeries devices
404
        KEYDEVS="${KEYDEVs} /dev/iseries/vcd*"
403
        KEYDEVS="${KEYDEVS} /dev/iseries/vcd*"
405
404
406
        findkeymount ${KEYDEVS}
405
        findkeymount ${KEYDEVS}
407
}
406
}
(-)genkernel/trunk/generic/linuxrc (-6 / +8 lines)
Lines 499-527 Link Here
499
	if [ "${LOOP_CRYPT}" != '' ] 
499
	if [ "${LOOP_CRYPT}" != '' ] 
500
	then
500
	then
501
		good_msg 'You booted an encrypted livecd'
501
		good_msg 'You booted an encrypted livecd'
502
		KEYNAME=$(head -n 1 ${NEW_ROOT}/mnt/cdrom/livecd)
502
		KEYNAME="$(head -n 1 ${NEW_ROOT}/mnt/cdrom/livecd)"
503
503
504
		if [ "${KEYNAME}" = '' ]
504
		if [ "${KEYNAME}" = '' ]
505
		then 
505
		then 
506
			good_msg 'It's not locked with a gpg key, attempting to decrypt manually'
506
			good_msg 'It's not locked with a key, attempting to decrypt manually'
507
			losetup -e ${LOOP_CRYPT} /dev/loop1 ${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}
507
			losetup -e ${LOOP_CRYPT} /dev/loop1 ${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}
508
			
508
			
509
509
510
		else 
510
		else 
511
			good_msg 'Livecd locked with gpg key'
511
			good_msg 'Livecd locked with key'
512
			bootstrapKey
512
			bootstrapKey
513
			good_msg 'Attempting to decrypt with key'
513
			good_msg 'Attempting to decrypt with key'
514
			losetup -K ${NEW_ROOT}/mnt/key/${SUBDIR}/${KEYNAME} -e ${LOOP_CRYPT} /dev/loop1 \
514
			losetup -K ${NEW_ROOT}/mnt/key/${KEYNAME} -e ${LOOP_CRYPT} /dev/loop1 \
515
				${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}
515
				${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}
516
		fi
516
		fi
517
517
518
		test_success 'Unencrypting loop'
518
		test_success 'Unencrypting loop'
519
		
519
		
520
		case ${LOOPTYPE} in
520
		case "${LOOPTYPE}" in
521
			squashfs)
521
			squashfs)
522
				MOUNTTYPE="squashfs"
522
				MOUNTTYPE="squashfs"
523
				;;
523
			normal)
524
			normal)
524
				MOUNTTYPE="ext2"
525
				MOUNTTYPE="ext2"
526
				;;
525
		esac
527
		esac
526
528
527
		mount -t ${MOUNTTYPE} -o ro /dev/loop1 ${NEW_ROOT}/mnt/livecd 
529
		mount -t ${MOUNTTYPE} -o ro /dev/loop1 ${NEW_ROOT}/mnt/livecd 
Lines 590-596 Link Here
590
			test_success 'mount /dev/loop0 /'
592
			test_success 'mount /dev/loop0 /'
591
			FS_LOCATION='mnt/livecd'
593
			FS_LOCATION='mnt/livecd'
592
		fi
594
		fi
593
	
595
	fi
594
#
596
#
595
# End cdrom looptype determination and mounting if necessary
597
# End cdrom looptype determination and mounting if necessary
596
#
598
#

Return to bug 174294