~oem-solutions-releng/live-build/lb-sg-2.x-add-support-for-xz-and-bzip2-compression

« back to all changes in this revision

Viewing changes to helpers/lh_binary_rootfs

  • Committer: Daniel Baumann
  • Date: 2011-03-09 17:19:41 UTC
  • Revision ID: daniel@debian.org-20110309171941-vyn0zxupujidmbu9
Adding live-helper 1.0~a15-1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
# Creating lock file
48
48
Create_lockfile .lock
49
49
 
 
50
case "${LIVE_ARCHITECTURE}" in
 
51
        amd64|i386)
 
52
                LINUX="vmlinuz"
 
53
                ;;
 
54
 
 
55
        powerpc)
 
56
                LINUX="vmlinux"
 
57
                ;;
 
58
esac
 
59
 
50
60
case "${LH_INITRAMFS}" in
51
61
        casper)
52
62
                INITFS="casper"
60
70
# Creating directory
61
71
mkdir -p binary/${INITFS}
62
72
 
 
73
for STAGE in ${LH_CACHE_STAGES}
 
74
do
 
75
        if [ "${STAGE}" = "rootfs" ] && [ -d cache/stages_rootfs ]
 
76
        then
 
77
                # Removing old chroot
 
78
                rm -rf binary/"${INITFS}"/filesystem.*
 
79
 
 
80
                # Restoring old cache
 
81
                mkdir -p binary/"${INITFS}"
 
82
                ${LH_ROOT_COMMAND} cp -a cache/stages_rootfs/filesystem.* binary/"${INITFS}"
 
83
 
 
84
                if [ -n "${LH_ROOT_COMMAND}" ]
 
85
                then
 
86
                        ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` binary
 
87
                fi
 
88
 
 
89
                # Creating stage file
 
90
                Create_stagefile .stage/binary_rootfs
 
91
                exit 0
 
92
        fi
 
93
done
 
94
 
63
95
case "${LIVE_CHROOT_FILESYSTEM}" in
64
96
        ext2)
65
97
                # Checking depends
121
153
 
122
154
                if [ "${LIVE_PACKAGES_LISTS}" != "minimal" ] && [ "${LIVE_PACKAGES_LISTS}" != "mini" ]
123
155
                then
124
 
                        MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e chroot/boot/vmlinuz* chroot/boot/initrd.img* chroot/vmlinuz* chroot/initrd.img* chroot/boot/config-* chroot/boot/System.map-*"
 
156
                        MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img* chroot/boot/config-* chroot/boot/System.map-*"
125
157
                fi
126
158
 
127
159
                if [ -f config/binary_rootfs/squashfs.sort ]
147
179
                ;;
148
180
esac
149
181
 
 
182
for STAGE in ${LH_CACHE_STAGES}
 
183
do
 
184
        if [ "${STAGE}" = "rootfs" ]
 
185
        then
 
186
                rm -rf cache/stages_rootfs
 
187
 
 
188
                mkdir -p cache/stages_rootfs
 
189
 
 
190
                ${LH_ROOT_COMMAND} cp -a binary/"${INITFS}"/filesystem.* cache/stages_rootfs
 
191
 
 
192
                if [ -n "${LH_ROOT_COMMAND}" ]
 
193
                then
 
194
                        ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_rootfs
 
195
                fi
 
196
        fi
 
197
done
 
198
 
150
199
# Creating stage file
151
200
Create_stagefile .stage/binary_rootfs