diff options
author | Chris Lamb <chris@chris-lamb.co.uk> | 2008-03-23 04:21:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:29 +0100 |
commit | 55472e65570b2ebd33a0bd9ca4aebfb0cad203e4 (patch) | |
tree | ea6372cd9bcf9b5597584772e9bc671968f67b6c /helpers | |
parent | 13625df75ce06441df9c8e19d104c4fabf69bafe (diff) | |
download | vyos-live-build-55472e65570b2ebd33a0bd9ca4aebfb0cad203e4.tar.gz vyos-live-build-55472e65570b2ebd33a0bd9ca4aebfb0cad203e4.zip |
Allow LH_ENCRYPTION="disabled" to disable encryption
Diffstat (limited to 'helpers')
-rwxr-xr-x | helpers/lh_binary_encryption | 45 | ||||
-rwxr-xr-x | helpers/lh_binary_grub | 11 | ||||
-rwxr-xr-x | helpers/lh_binary_syslinux | 11 | ||||
-rwxr-xr-x | helpers/lh_binary_yaboot | 11 | ||||
-rwxr-xr-x | helpers/lh_config | 4 |
5 files changed, 44 insertions, 38 deletions
diff --git a/helpers/lh_binary_encryption b/helpers/lh_binary_encryption index 35bdc2421..1de5b9459 100755 --- a/helpers/lh_binary_encryption +++ b/helpers/lh_binary_encryption @@ -33,10 +33,27 @@ Read_conffile config/source Read_conffile "${LH_CONFIG}" Set_defaults -if [ -z "${LH_ENCRYPTION}" ] -then - exit 0 -fi +case "${LH_ENCRYPTION}" in + aes128|aes192|aes256) + ;; + ""|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..." @@ -63,26 +80,6 @@ case "${LH_INITRAMFS}" in ;; 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 Check_package chroot/usr/bin/aespipe aespipe diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub index 6915cf593..1e4376bbf 100755 --- a/helpers/lh_binary_grub +++ b/helpers/lh_binary_grub @@ -136,10 +136,13 @@ Check_multiarchitecture mkdir -p "${DESTDIR_LIVE}" # Setting boot parameters -if [ -n "${LH_ENCRYPTION}" ] -then - LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}" -fi + +case "${LH_ENCRYPTION}" in + ""|disabled) + ;; + *) + LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}" +esac if [ -n "${LH_USERNAME}" ] then diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux index 535fb8f1f..98dabeb02 100755 --- a/helpers/lh_binary_syslinux +++ b/helpers/lh_binary_syslinux @@ -388,10 +388,13 @@ mkdir -p "${SCREEN_PATH}" mkdir -p "${DATA_PATH}" # Setting boot parameters -if [ -n "${LH_ENCRYPTION}" ] -then - LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}" -fi +case "${LH_ENCRYPTION}" in + ""|disabled) + ;; + *) + LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}" + ;; +esac if [ -n "${LH_USERNAME}" ] then diff --git a/helpers/lh_binary_yaboot b/helpers/lh_binary_yaboot index 85a7f940a..2ae5c55cf 100755 --- a/helpers/lh_binary_yaboot +++ b/helpers/lh_binary_yaboot @@ -144,10 +144,13 @@ Check_multiarchitecture mkdir -p "${DESTDIR_LIVE}" # Setting boot parameters -if [ -n "${LH_ENCRYPTION}" ] -then - LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}" -fi +case "${LH_ENCRYPTION}" in + ""|disabled) + ;; + *) + LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}" + ;; +esac if [ -n "${LH_USERNAME}" ] then diff --git a/helpers/lh_config b/helpers/lh_config index 42df97f15..f7c2871d8 100755 --- a/helpers/lh_config +++ b/helpers/lh_config @@ -56,7 +56,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--debian-installer-daily enabled|disabled]\n\ \t [--debug]\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 [--force]\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_ENCRYPTION: set encrytion -# (Default: empty) +# (Default: ${LH_ENCRYPTION}) LH_ENCRYPTION="${LH_ENCRYPTION}" # \$LH_GRUB_SPLASH: set custom grub splash |