View | Details | Raw Unified
Collapse All | Expand All

(-) genkernel/trunk/generic/initrd.scripts (-3 / +2 lines)
 Lines 111-121    Link Here 
                                good_msg "Attempting to mount key media:- ${x}"
                                good_msg "Attempting to mount key media:- ${x}"
                                mount -r -t auto ${x} ${NEW_ROOT}/mnt/key \
                                mount -r -t auto ${x} ${NEW_ROOT}/mnt/key \
                                                > /dev/null 2>&1
                                                > /dev/null 2>&1
                                fi
                                if [ "$?" = '0' ]
                                if [ "$?" = '0' ]
                                then
                                then
                                        # Check for the key
                                        # Check for the key
                                        if [ -e ${NEW_ROOT}/mnt/key/${SUBDIR}/${KEYNAME} ]
                                        if [ -e ${NEW_ROOT}/mnt/key/${KEYNAME} ]
                                        then
                                        then
                                                KEY_ROOT="${x}"
                                                KEY_ROOT="${x}"
                                                break
                                                break
 Lines 401-407    Link Here 
        # USB using the USB Block Driver
        # USB using the USB Block Driver
        KEYDEVS="${KEYDEVS} /dev/ubd* /dev/ubd/*"
        KEYDEVS="${KEYDEVS} /dev/ubd* /dev/ubd/*"
        # iSeries devices
        # iSeries devices
        KEYDEVS="${KEYDEVs} /dev/iseries/vcd*"
        KEYDEVS="${KEYDEVS} /dev/iseries/vcd*"
        findkeymount ${KEYDEVS}
        findkeymount ${KEYDEVS}
}
}
(-) genkernel/trunk/generic/linuxrc (-6 / +8 lines)
 Lines 499-527    Link Here 
	if [ "${LOOP_CRYPT}" != '' ] 
	if [ "${LOOP_CRYPT}" != '' ] 
	then
	then
		good_msg 'You booted an encrypted livecd'
		good_msg 'You booted an encrypted livecd'
		KEYNAME=$(head -n 1 ${NEW_ROOT}/mnt/cdrom/livecd)
		KEYNAME="$(head -n 1 ${NEW_ROOT}/mnt/cdrom/livecd)"
		if [ "${KEYNAME}" = '' ]
		if [ "${KEYNAME}" = '' ]
		then 
		then 
			good_msg 'It's not locked with a gpg key, attempting to decrypt manually'
			good_msg 'It's not locked with a key, attempting to decrypt manually'
			losetup -e ${LOOP_CRYPT} /dev/loop1 ${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}
			losetup -e ${LOOP_CRYPT} /dev/loop1 ${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}
			
			
		else 
		else 
			good_msg 'Livecd locked with gpg key'
			good_msg 'Livecd locked with key'
			bootstrapKey
			bootstrapKey
			good_msg 'Attempting to decrypt with key'
			good_msg 'Attempting to decrypt with key'
			losetup -K ${NEW_ROOT}/mnt/key/${SUBDIR}/${KEYNAME} -e ${LOOP_CRYPT} /dev/loop1 \
			losetup -K ${NEW_ROOT}/mnt/key/${KEYNAME} -e ${LOOP_CRYPT} /dev/loop1 \
				${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}
				${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}
		fi
		fi
		test_success 'Unencrypting loop'
		test_success 'Unencrypting loop'
		
		
		case ${LOOPTYPE} in
		case "${LOOPTYPE}" in
			squashfs)
			squashfs)
				MOUNTTYPE="squashfs"
				MOUNTTYPE="squashfs"
				;;
			normal)
			normal)
				MOUNTTYPE="ext2"
				MOUNTTYPE="ext2"
				;;
		esac
		esac
		mount -t ${MOUNTTYPE} -o ro /dev/loop1 ${NEW_ROOT}/mnt/livecd 
		mount -t ${MOUNTTYPE} -o ro /dev/loop1 ${NEW_ROOT}/mnt/livecd 
 Lines 590-596    Link Here 
			test_success 'mount /dev/loop0 /'
			test_success 'mount /dev/loop0 /'
			FS_LOCATION='mnt/livecd'
			FS_LOCATION='mnt/livecd'
		fi
		fi
	
	fi
#
#
# End cdrom looptype determination and mounting if necessary
# End cdrom looptype determination and mounting if necessary
#
#