diff options
author | Jesse Hathaway <jesse@mbuki-mvuki.org> | 2007-10-13 16:47:39 -0400 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:22:27 +0100 |
commit | a40fb341ea42559224113f583303313e4463f7b6 (patch) | |
tree | 4a226f8644c0ba4b7a6e66b042be3a445cb42c5c /helpers/lh_binary_syslinux | |
parent | 1bea707a71a750a1277376758d5a73df2261cb47 (diff) | |
download | live-build-a40fb341ea42559224113f583303313e4463f7b6.zip live-build-a40fb341ea42559224113f583303313e4463f7b6.tar.gz |
readd support for booting etch via syslinux
Diffstat (limited to 'helpers/lh_binary_syslinux')
-rwxr-xr-x | helpers/lh_binary_syslinux | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux index ff79f08..8732c1c 100755 --- a/helpers/lh_binary_syslinux +++ b/helpers/lh_binary_syslinux @@ -239,7 +239,7 @@ Copy_syslinux_templates () Configure_syslinux_templates () { - templates=$(find ${SYSLINUX_PATH} -type f -name '*.cfg' -o -name '*.txt' -o -name 'default') + templates=$(find ${SYSLINUX_PATH} -type f -name '*.cfg' -o -name '*.txt') for template_file in ${templates}; do sed -i -e "s@{\$LINUX_LIVE}@${LINUX_LIVE}@" \ -e "s@{\$LINUX_INSTALL}@${LINUX_INSTALL}@" \ @@ -256,6 +256,28 @@ Configure_syslinux_templates () -e 's/\ $//g' \ $template_file done + + # Syslinux v3.31 in etch does not support include statement + if [ "${LH_DISTRIBUTION}" = "etch" ] + then + while grep -q ^include ${SYSLINUX_PATH}/syslinux.cfg + do + INCLUDES=$(grep ^include ${SYSLINUX_PATH}/syslinux.cfg |awk '{print $2}') + for FILE_PATH in ${INCLUDES} + do + FILE_NAME=$(basename ${FILE_PATH}) + sed -i -e '\@include '${FILE_PATH}'@ { + r '${SYSLINUX_PATH}/${FILE_NAME}' + d + }' ${SYSLINUX_PATH}/syslinux.cfg + # remove the files, which were included + if [ -e ${SYSLINUX_PATH}/${FILE_NAME} ] + then + rm ${SYSLINUX_PATH}/${FILE_NAME} + fi + done + done + fi } # Setting up common variables @@ -437,6 +459,9 @@ fi # Copy templates to base syslinux directory Copy_syslinux_templates +# Fill in templates with created values +Configure_syslinux_templates + # Configure syslinux setup per boot method case "${LH_BINARY_IMAGES}" in iso) @@ -497,9 +522,6 @@ case "${LH_BINARY_IMAGES}" in ;; esac -# Fill in templates with created values -Configure_syslinux_templates - # Saving cache Save_cache cache/packages_binary |