Shortening kernel and initrd filenames in /live again similar to what we did with in lenny.
Unfortunately, syslinux as of wheezy and newer apparently does not support long filenames anymore. Therefore, we do have to shorten the filenames from: /live/vmlinuz-3.2.0-1-amd64 /live/initrd.img-3.2.0-1-amd64 to: /live/vmlinuz /live/initrd.img In case more than one kernel flavour is used, the files are being numbered, starting with vmlinuz1 and initrd1.img.
This commit is contained in:
parent
3f62ac0a3d
commit
3004ef6851
|
@ -170,19 +170,43 @@ esac
|
|||
# Configuring files
|
||||
if [ -e "${_TARGET}/live.cfg.in" ]
|
||||
then
|
||||
# FIXME: only works with one kernel version for the time being
|
||||
for _FLAVOUR in ${LB_LINUX_FLAVOURS}
|
||||
do
|
||||
_VERSION="$(basename binary/live/vmlinuz-*-${_FLAVOUR} -${_FLAVOUR} | sed -e 's|vmlinuz-||')"
|
||||
# This is all rather suboptimal.. needs prettifying at some point
|
||||
_FLAVOURS="$(echo ${LB_LINUX_FLAVOURS} | wc -w)"
|
||||
|
||||
sed -e "s|@FLAVOUR@|${_FLAVOUR}|g" \
|
||||
-e "s|@KERNEL@|/live/vmlinuz-${_VERSION}-${_FLAVOUR}|g" \
|
||||
-e "s|@INITRD@|/live/initrd.img-${_VERSION}-${_FLAVOUR}|g" \
|
||||
-e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|g" \
|
||||
"${_TARGET}/live.cfg.in" >> "${_TARGET}/live.cfg"
|
||||
done
|
||||
case "${_FLAVOURS}" in
|
||||
1)
|
||||
mv binary/live/vmlinuz-* binary/live/vmlinuz
|
||||
mv binary/live/initrd.img-* binary/live/initrd.img
|
||||
|
||||
rm -f "${_TARGET}/live.cfg.in"
|
||||
sed -e "s|@FLAVOUR@|${LB_LINUX_FLAVOUR}|g" \
|
||||
-e "s|@KERNEL@|/live/vmlinuz|g" \
|
||||
-e "s|@INITRD@|/live/initrd.img|g" \
|
||||
-e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|g" \
|
||||
"${_TARGET}/live.cfg.in" >> "${_TARGET}/live.cfg"
|
||||
|
||||
rm -f "${_TARGET}/live.cfg.in"
|
||||
;;
|
||||
|
||||
*)
|
||||
_NUMBER="0"
|
||||
|
||||
for _FLAVOUR in ${LB_LINUX_FLAVOURS}
|
||||
do
|
||||
_NUMBER="$((${_NUMBER} + 1))"
|
||||
|
||||
mv binary/live/vmlinuz-*-${_FLAVOUR} binary/live/vmlinuz${_NUMBER}
|
||||
mv binary/live/initrd.img-*-${_FLAVOUR} binary/live/initrd${_NUMBER}.img
|
||||
|
||||
sed -e "s|@FLAVOUR@|${_FLAVOUR}|g" \
|
||||
-e "s|@KERNEL@|/live/vmlinuz${_NUMBER}|g" \
|
||||
-e "s|@INITRD@|/live/initrd${_NUMBER}.img|g" \
|
||||
-e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|g" \
|
||||
"${_TARGET}/live.cfg.in" >> "${_TARGET}/live.cfg"
|
||||
done
|
||||
|
||||
rm -f "${_TARGET}/live.cfg.in"
|
||||
;;
|
||||
esac
|
||||
elif [ -e "${_TARGET}/live.cfg" ]
|
||||
then
|
||||
sed -i -e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|g" \
|
||||
|
|
Loading…
Reference in New Issue