diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:05:11 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:05:11 +0200 |
commit | 0ffe6970c43a544a2b8dcee46db1048da84fd608 (patch) | |
tree | 1226c8a7ad43a2dd53e411c2e379969424e88e32 /helpers/lh_binary_rootfs | |
parent | 275767bf2f361eb28993381ac0e3f1aee505bc72 (diff) | |
download | vyos-live-build-0ffe6970c43a544a2b8dcee46db1048da84fd608.tar.gz vyos-live-build-0ffe6970c43a544a2b8dcee46db1048da84fd608.zip |
Adding live-helper 1.0~a13-1.
Diffstat (limited to 'helpers/lh_binary_rootfs')
-rwxr-xr-x | helpers/lh_binary_rootfs | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs index 47529a297..359151f7d 100755 --- a/helpers/lh_binary_rootfs +++ b/helpers/lh_binary_rootfs @@ -9,21 +9,21 @@ set -e -# Source common functions -for FUNCTION in /usr/share/live-helper/functions/*.sh +# Including common functions +LH_BASE="${LH_BASE:-/usr/share/live-helper}" + +for FUNCTION in "${LH_BASE}"/functions/*.sh do - . ${FUNCTION} + . "${FUNCTION}" done -# Set static variables +# Setting static variables DESCRIPTION="build rootfs image" HELP="" USAGE="${PROGRAM} [--force]" Arguments "${@}" -Echo_debug "Init ${PROGRAM}" - # Reading configuration files Read_conffile config/common Read_conffile config/bootstrap @@ -32,7 +32,7 @@ Read_conffile config/binary Read_conffile config/source Set_defaults -Breakpoint "binary_rootfs: Init" +Echo_message "Begin building root filesystem image..." # Requiring stage file Require_stagefile .stage/bootstrap @@ -58,10 +58,7 @@ case "${LH_INITRAMFS}" in esac # Creating directory -if [ ! -d binary/${INITFS} ] -then - mkdir -p binary/${INITFS} -fi +mkdir -p binary/${INITFS} case "${LIVE_CHROOT_FILESYSTEM}" in ext2) @@ -127,12 +124,18 @@ case "${LIVE_CHROOT_FILESYSTEM}" in MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e chroot/boot/vmlinuz* chroot/boot/initrd.img* chroot/vmlinuz* chroot/initrd.img* chroot/boot/config-* chroot/boot/System.map-*" fi + if [ -f config/binary_rootfs/squashfs.sort ] + then + MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -sort squashfs.sort" + cp config/binary_rootfs/squashfs.sort chroot + fi + # Create image Chroot "mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}" # Move image ${LH_ROOT_COMMAND} mv chroot/filesystem.squashfs binary/${INITFS} - ${LH_ROOT_COMMAND} rm -rf chroot/chroot + ${LH_ROOT_COMMAND} rm -rf chroot/chroot chroot/squashfs.sort if [ -n "${LH_ROOT_COMMAND}" ] then |