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 is 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 |
# |