summaryrefslogtreecommitdiff
path: root/helpers/lh_genrootfs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:46 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:14:51 +0100
commitfe6eb1c593e2df135c8807bf94df614984b4d6ec (patch)
tree693b803dcc6473a8699f0c605c92b10c24755e28 /helpers/lh_genrootfs
parent470cf1764bf56b32addff591cfe3fd69af0e5760 (diff)
downloadlive-build-fe6eb1c593e2df135c8807bf94df614984b4d6ec.zip
live-build-fe6eb1c593e2df135c8807bf94df614984b4d6ec.tar.gz
Adding live-helper 1.0~a1-1.
Diffstat (limited to 'helpers/lh_genrootfs')
-rwxr-xr-xhelpers/lh_genrootfs76
1 files changed, 0 insertions, 76 deletions
diff --git a/helpers/lh_genrootfs b/helpers/lh_genrootfs
deleted file mode 100755
index 5853ed2..0000000
--- a/helpers/lh_genrootfs
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-
-# lh_genrootfs.sh <filesystem>
-
-case "${LIVE_FILESYSTEM}" in
- ext2)
- DU_DIM="`du -ks ${LIVE_CHROOT} | cut -f1`"
- REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here...
-
- if [ -z "${LIVE_ENCRYPTION}" ]
- then
- genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root="${LIVE_CHROOT}" "${LIVE_ROOT}"/binary/casper/filesystem.ext2
- else
- echo "Encrypting ${LIVE_ROOT}/binary/casper/filesystem.ext2 with ${LIVE_ENCRYPTION}..."
-
- while true
- do
- genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root="${LIVE_CHROOT}" | aespipe -e "${LIVE_ENCRYPTION}" -T > "${LIVE_ROOT}"/binary/casper/filesystem.ext2 && break
-
- echo -n "Something went wrong... Retry? [YES/no] "
- read ANSWER
-
- if [ 'no' = "${ANSWER}" ]
- then
- unset ANSWER
- break
- fi
- done
- fi
- ;;
-
- plain)
- if [ -n "${LIVE_ENCRYPTION}" ]
- then
- echo "Error: encryption is not supported for filesystem type 'plain'"
- exit 1
- fi
-
- cd "${LIVE_CHROOT}"
- find . | cpio -pumd "${LIVE_ROOT}"/binary/casper/filesystem.dir
- cd "${OLDPWD}"
- ;;
-
- squashfs)
- if [ -f "${LIVE_ROOT}"/binary/casper/filesystem.squashfs ]
- then
- rm "${LIVE_ROOT}"/binary/casper/filesystem.squashfs
- fi
-
- if [ "${LIVE_FLAVOUR}" = "minimal" ] || [ "${LIVE_FLAVOUR}" = "mini" ]
- then
- mksquashfs "${LIVE_CHROOT}" "${LIVE_ROOT}"/binary/casper/filesystem.squashfs -e "${LIVE_CHROOT}"/boot/vmlinuz* "${LIVE_CHROOT}"/boot/initrd.img* "${LIVE_CHROOT}"/vmlinuz "${LIVE_CHROOT}"/initrd.img "${LIVE_CHROOT}"/boot/config-* "${LIVE_CHROOT}"/boot/System.map-*
- else
- mksquashfs "${LIVE_CHROOT}" "${LIVE_ROOT}"/binary/casper/filesystem.squashfs
- fi
-
- if [ -n "$LIVE_ENCRYPTION" ]
- then
- echo "Encrypting ${LIVE_ROOT}/binary/casper/filesystem.squashfs with ${LIVE_ENCRYPTION}..."
-
- while true
- do
- cat "${LIVE_ROOT}"/binary/casper/filesystem.squashfs | aespipe -e "${LIVE_ENCRYPTION}" -T > "${LIVE_ROOT}"/binary/casper/filesystem.squashfs.encrypted && mv "${LIVE_ROOT}"/binary/casper/filesystem.squashfs.encrypted "${LIVE_ROOT}"/binary/casper/filesystem.squashfs && break
-
- echo -n "Something went wrong... Retry? [YES/no] "
- read ANSWER
-
- if [ 'no' = "${ANSWER}" ]
- then
- unset ANSWER
- break
- fi
- done
- fi
- ;;
-esac