diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:05:12 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:19:41 +0100 |
commit | 504c05c3a63de0af4fd0e876274afc039c5c0ed1 (patch) | |
tree | 5a29d0f82735a131c9319b5b825c57b740584d13 /helpers/lh_binary_rootfs | |
parent | 37a5c53ddd2825bf6b0ce521908a63d419683981 (diff) | |
download | live-build-504c05c3a63de0af4fd0e876274afc039c5c0ed1.zip live-build-504c05c3a63de0af4fd0e876274afc039c5c0ed1.tar.gz |
Adding live-helper 1.0~a15-1.
Diffstat (limited to 'helpers/lh_binary_rootfs')
-rwxr-xr-x | helpers/lh_binary_rootfs | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs index 455b1ab..f2a00f3 100755 --- a/helpers/lh_binary_rootfs +++ b/helpers/lh_binary_rootfs @@ -47,6 +47,16 @@ Check_lockfile .lock # Creating lock file Create_lockfile .lock +case "${LIVE_ARCHITECTURE}" in + amd64|i386) + LINUX="vmlinuz" + ;; + + powerpc) + LINUX="vmlinux" + ;; +esac + case "${LH_INITRAMFS}" in casper) INITFS="casper" @@ -60,6 +70,28 @@ esac # Creating directory mkdir -p binary/${INITFS} +for STAGE in ${LH_CACHE_STAGES} +do + if [ "${STAGE}" = "rootfs" ] && [ -d cache/stages_rootfs ] + then + # Removing old chroot + rm -rf binary/"${INITFS}"/filesystem.* + + # Restoring old cache + mkdir -p binary/"${INITFS}" + ${LH_ROOT_COMMAND} cp -a cache/stages_rootfs/filesystem.* binary/"${INITFS}" + + if [ -n "${LH_ROOT_COMMAND}" ] + then + ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` binary + fi + + # Creating stage file + Create_stagefile .stage/binary_rootfs + exit 0 + fi +done + case "${LIVE_CHROOT_FILESYSTEM}" in ext2) # Checking depends @@ -121,7 +153,7 @@ case "${LIVE_CHROOT_FILESYSTEM}" in if [ "${LIVE_PACKAGES_LISTS}" != "minimal" ] && [ "${LIVE_PACKAGES_LISTS}" != "mini" ] then - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e chroot/boot/vmlinuz* chroot/boot/initrd.img* chroot/vmlinuz* chroot/initrd.img* chroot/boot/config-* chroot/boot/System.map-*" + MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img* chroot/boot/config-* chroot/boot/System.map-*" fi if [ -f config/binary_rootfs/squashfs.sort ] @@ -147,5 +179,22 @@ case "${LIVE_CHROOT_FILESYSTEM}" in ;; esac +for STAGE in ${LH_CACHE_STAGES} +do + if [ "${STAGE}" = "rootfs" ] + then + rm -rf cache/stages_rootfs + + mkdir -p cache/stages_rootfs + + ${LH_ROOT_COMMAND} cp -a binary/"${INITFS}"/filesystem.* cache/stages_rootfs + + if [ -n "${LH_ROOT_COMMAND}" ] + then + ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_rootfs + fi + fi +done + # Creating stage file Create_stagefile .stage/binary_rootfs |