Use LB_INITRAMFS case instead of assuming "live".

This commit is contained in:
Kiel Christofferson 2013-06-20 11:24:46 -04:00
parent eb336bb782
commit a934c03e06
1 changed files with 18 additions and 8 deletions

View File

@ -47,6 +47,16 @@ Create_lockfile .lock
Check_architectures amd64 i386
Check_crossarchitectures
case "${LB_INITRAMFS}" in
casper)
_INITRAMFS="casper"
;;
*)
_INITRAMFS="live"
;;
esac
# Assembling image specifics
case "${LIVE_IMAGE_TYPE}" in
iso*)
@ -169,12 +179,12 @@ then
case "${_FLAVOURS}" in
1)
mv binary/live/vmlinuz-* binary/live/vmlinuz
mv binary/live/initrd.img-* binary/live/initrd.img
mv binary/${_INITRAMFS}/vmlinuz-* binary/${_INITRAMFS}/vmlinuz
mv binary/${_INITRAMFS}/initrd.img-* binary/${_INITRAMFS}/initrd.img
sed -e "s|@FLAVOUR@|${LB_LINUX_FLAVOURS}|g" \
-e "s|@LINUX@|/live/vmlinuz|g" \
-e "s|@INITRD@|/live/initrd.img|g" \
-e "s|@LINUX@|/${_INITRAMFS}/vmlinuz|g" \
-e "s|@INITRD@|/${_INITRAMFS}/initrd.img|g" \
"${_TARGET}/live.cfg.in" >> "${_TARGET}/live.cfg"
rm -f "${_TARGET}/live.cfg.in"
@ -187,8 +197,8 @@ then
do
_NUMBER="$((${_NUMBER} + 1))"
mv binary/live/vmlinuz-*-${_FLAVOUR} binary/live/vmlinuz${_NUMBER}
mv binary/live/initrd.img-*-${_FLAVOUR} binary/live/initrd${_NUMBER}.img
mv binary/${_INITRAMFS}/vmlinuz-*-${_FLAVOUR} binary/${_INITRAMFS}/vmlinuz${_NUMBER}
mv binary/${_INITRAMFS}/initrd.img-*-${_FLAVOUR} binary/${_INITRAMFS}/initrd${_NUMBER}.img
if [ "${_NUMBER}" -gt 1 ]
then
@ -199,8 +209,8 @@ then
fi
sed -i -e "s|@FLAVOUR@|${_FLAVOUR}|g" \
-e "s|@LINUX@|/live/vmlinuz${_NUMBER}|g" \
-e "s|@INITRD@|/live/initrd${_NUMBER}.img|g" \
-e "s|@LINUX@|/${_INITRAMFS}/vmlinuz${_NUMBER}|g" \
-e "s|@INITRD@|/${_INITRAMFS}/initrd${_NUMBER}.img|g" \
"${_TARGET}/live.cfg"
done