From bd1a5ddc8203907eb40135303bea5488397ec5d0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 10:04:52 +0200 Subject: Adding live-helper 1.0~a8-1. --- helpers/lh_binary_encryption | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'helpers/lh_binary_encryption') diff --git a/helpers/lh_binary_encryption b/helpers/lh_binary_encryption index d660b522f..e40420788 100755 --- a/helpers/lh_binary_encryption +++ b/helpers/lh_binary_encryption @@ -25,10 +25,11 @@ Arguments "${@}" Echo_debug "Init ${PROGRAM}" # Reading configuration files +Read_conffile config/common Read_conffile config/bootstrap Read_conffile config/chroot -Read_conffile config/common -Read_conffile config/image +Read_conffile config/binary +Read_conffile config/source Set_defaults if [ -z "${LIVE_ENCRYPTION}" ] @@ -51,6 +52,16 @@ Check_lockfile .lock # Creating lock file Create_lockfile .lock +case "${LH_INITRAMFS}" in + casper) + INITFS="casper" + ;; + + live-initramfs) + INITFS="live" + ;; +esac + case "${LIVE_FILESYSTEM}" in ext2) ROOTFS="ext2" @@ -73,9 +84,9 @@ Check_package chroot/usr/bin/aespipe aespipe Install_package # Moving image -mv binary/casper/filesystem.${LIVE_FILESYSTEM} chroot +mv binary/${INITFS}/filesystem.${LIVE_FILESYSTEM} chroot -echo "Encrypting binary/casper/filesystem.${ROOTFS} with ${LIVE_ENCRYPTION}..." +echo "Encrypting binary/${INITFS}/filesystem.${ROOTFS} with ${LIVE_ENCRYPTION}..." cat >> chroot/encrypt << EOF while true @@ -97,7 +108,7 @@ EOF Chroot "sh encrypt" # Move image -mv chroot/filesystem.${LIVE_FILESYSTEM} binary/casper +mv chroot/filesystem.${LIVE_FILESYSTEM} binary/${INITFS} rm -f chroot/encrypt # Removing depends -- cgit v1.2.3