summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_encryption
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:05:09 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:29 +0100
commit97c3a13dcc9becf93cb7c2aa89ea3e00f06b9179 (patch)
treed7facbbbf53b1a5bc0fa92f671f5b1e29a7e3200 /helpers/lh_binary_encryption
parent7c68e6ebca01f64501453fa53941ac77b9c2c335 (diff)
downloadlive-build-97c3a13dcc9becf93cb7c2aa89ea3e00f06b9179.zip
live-build-97c3a13dcc9becf93cb7c2aa89ea3e00f06b9179.tar.gz
Adding live-helper 1.0~a10-1.
Diffstat (limited to 'helpers/lh_binary_encryption')
-rwxr-xr-xhelpers/lh_binary_encryption14
1 files changed, 7 insertions, 7 deletions
diff --git a/helpers/lh_binary_encryption b/helpers/lh_binary_encryption
index e404207..f055a07 100755
--- a/helpers/lh_binary_encryption
+++ b/helpers/lh_binary_encryption
@@ -62,7 +62,7 @@ case "${LH_INITRAMFS}" in
;;
esac
-case "${LIVE_FILESYSTEM}" in
+case "${LIVE_CHROOT_FILESYSTEM}" in
ext2)
ROOTFS="ext2"
;;
@@ -84,14 +84,14 @@ Check_package chroot/usr/bin/aespipe aespipe
Install_package
# Moving image
-mv binary/${INITFS}/filesystem.${LIVE_FILESYSTEM} chroot
+mv binary/${INITFS}/filesystem.${LIVE_CHROOT_FILESYSTEM} chroot
echo "Encrypting binary/${INITFS}/filesystem.${ROOTFS} with ${LIVE_ENCRYPTION}..."
-cat >> chroot/encrypt << EOF
+cat >> chroot/encrypt.sh << EOF
while true
do
- cat filesystem.${ROOTFS} | aespipe -e ${LIVE_ENCRYPTION} -T > filesystem.${ROOTFS} && break
+ cat filesystem.${ROOTFS} | aespipe -e ${LIVE_ENCRYPTION} -T > filesystem.${ROOTFS}.tmp && mv filesystem.${ROOTFS}.tmp filesystem.${ROOTFS} && break
echo -n "Something went wrong... Retry? [YES/no] "
@@ -105,11 +105,11 @@ do
done
EOF
-Chroot "sh encrypt"
+Chroot "sh encrypt.sh"
# Move image
-mv chroot/filesystem.${LIVE_FILESYSTEM} binary/${INITFS}
-rm -f chroot/encrypt
+mv chroot/filesystem.${LIVE_CHROOT_FILESYSTEM} binary/${INITFS}
+rm -f chroot/encrypt.sh
# Removing depends
Remove_package