summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_encryption
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:52 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:29 +0100
commitbd1a5ddc8203907eb40135303bea5488397ec5d0 (patch)
treee1cdc0adec3e4799f5db5ad1a8b34800e28a9439 /helpers/lh_binary_encryption
parent8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1 (diff)
downloadvyos-live-build-bd1a5ddc8203907eb40135303bea5488397ec5d0.tar.gz
vyos-live-build-bd1a5ddc8203907eb40135303bea5488397ec5d0.zip
Adding live-helper 1.0~a8-1.
Diffstat (limited to 'helpers/lh_binary_encryption')
-rwxr-xr-xhelpers/lh_binary_encryption21
1 files changed, 16 insertions, 5 deletions
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