Allow LH_ENCRYPTION="disabled" to disable encryption

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
This commit is contained in:
Chris Lamb 2008-03-23 04:21:47 +00:00
parent ea375828e9
commit 1ca0b58aac
6 changed files with 52 additions and 43 deletions

View File

@ -430,10 +430,13 @@ Set_defaults ()
fi fi
fi fi
if [ -n "${LH_ENCRYPTION}" ] case "${LH_ENCRYPTION}" in
then ""|disabled)
LH_LINUX_PACKAGES="${LH_LINUX_PACKAGES} loop-aes-modules-2.6" ;;
fi *)
LH_LINUX_PACKAGES="${LH_LINUX_PACKAGES} loop-aes-modules-2.6"
;;
esac
fi fi
# Setting packages string # Setting packages string
@ -529,7 +532,7 @@ Set_defaults ()
LH_DEBIAN_INSTALLER_DAILY="${LH_DEBIAN_INSTALLER_DAILY:-disabled}" LH_DEBIAN_INSTALLER_DAILY="${LH_DEBIAN_INSTALLER_DAILY:-disabled}"
# Setting encryption # Setting encryption
# LH_ENCRYPTION LH_ENCRYPTION="${LH_ENCRYPTION:-disabled}"
# Setting grub splash # Setting grub splash
# LH_GRUB_SPLASH # LH_GRUB_SPLASH

View File

@ -33,10 +33,27 @@ Read_conffile config/source
Read_conffile "${LH_CONFIG}" Read_conffile "${LH_CONFIG}"
Set_defaults Set_defaults
if [ -z "${LH_ENCRYPTION}" ] case "${LH_ENCRYPTION}" in
then aes128|aes192|aes256)
exit 0 ;;
fi ""|disabled)
exit 0
;;
*)
Echo_error "Encryption type \"${LH_ENCRYPTION}\" not supported."
exit 1
;;
esac
case "${LH_CHROOT_FILESYSTEM}" in
ext2|squashfs)
;;
*)
Echo_error "Encryption not yet supported on ${LH_CHROOT_FILESYSTEM} filesystems."
exit 1
;;
esac
Echo_message "Begin encrypting root filesystem image..." Echo_message "Begin encrypting root filesystem image..."
@ -63,26 +80,6 @@ case "${LH_INITRAMFS}" in
;; ;;
esac esac
case "${LH_CHROOT_FILESYSTEM}" in
ext2)
ROOTFS="ext2"
;;
jffs2)
Echo_warning "encryption not yet supported on jffs2 filesystem."
exit 0
;;
plain)
Echo_warning "encryption not supported on plain filesystem."
exit 0
;;
squashfs)
ROOTFS="squashfs"
;;
esac
# Checking depends # Checking depends
Check_package chroot/usr/bin/aespipe aespipe Check_package chroot/usr/bin/aespipe aespipe

View File

@ -136,10 +136,13 @@ Check_multiarchitecture
mkdir -p "${DESTDIR_LIVE}" mkdir -p "${DESTDIR_LIVE}"
# Setting boot parameters # Setting boot parameters
if [ -n "${LH_ENCRYPTION}" ]
then case "${LH_ENCRYPTION}" in
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}" ""|disabled)
fi ;;
*)
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}"
esac
if [ -n "${LH_USERNAME}" ] if [ -n "${LH_USERNAME}" ]
then then

View File

@ -388,10 +388,13 @@ mkdir -p "${SCREEN_PATH}"
mkdir -p "${DATA_PATH}" mkdir -p "${DATA_PATH}"
# Setting boot parameters # Setting boot parameters
if [ -n "${LH_ENCRYPTION}" ] case "${LH_ENCRYPTION}" in
then ""|disabled)
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}" ;;
fi *)
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}"
;;
esac
if [ -n "${LH_USERNAME}" ] if [ -n "${LH_USERNAME}" ]
then then

View File

@ -144,10 +144,13 @@ Check_multiarchitecture
mkdir -p "${DESTDIR_LIVE}" mkdir -p "${DESTDIR_LIVE}"
# Setting boot parameters # Setting boot parameters
if [ -n "${LH_ENCRYPTION}" ] case "${LH_ENCRYPTION}" in
then ""|disabled)
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}" ;;
fi *)
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}"
;;
esac
if [ -n "${LH_USERNAME}" ] if [ -n "${LH_USERNAME}" ]
then then

View File

@ -56,7 +56,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--debian-installer-daily enabled|disabled]\n\ \t [--debian-installer-daily enabled|disabled]\n\
\t [--debug]\n\ \t [--debug]\n\
\t [-d|--distribution CODENAME]\n\ \t [-d|--distribution CODENAME]\n\
\t [-e|--encryption aes128|aes192|aes256]\n\ \t [-e|--encryption disabled|aes128|aes192|aes256]\n\
\t [--fdisk fdisk|fdisk.dist]\n\ \t [--fdisk fdisk|fdisk.dist]\n\
\t [--force]\n\ \t [--force]\n\
\t [--genisoimage genisomage|mkisofs]\n\ \t [--genisoimage genisomage|mkisofs]\n\
@ -989,7 +989,7 @@ LH_DEBIAN_INSTALLER="${LH_DEBIAN_INSTALLER}"
LH_DEBIAN_INSTALLER_DAILY="${LH_DEBIAN_INSTALLER_DAILY}" LH_DEBIAN_INSTALLER_DAILY="${LH_DEBIAN_INSTALLER_DAILY}"
# \$LH_ENCRYPTION: set encrytion # \$LH_ENCRYPTION: set encrytion
# (Default: empty) # (Default: ${LH_ENCRYPTION})
LH_ENCRYPTION="${LH_ENCRYPTION}" LH_ENCRYPTION="${LH_ENCRYPTION}"
# \$LH_GRUB_SPLASH: set custom grub splash # \$LH_GRUB_SPLASH: set custom grub splash