From fc09043febf0c4ae065eea1078e474acfb945ecd Mon Sep 17 00:00:00 2001 From: Frans Pop Date: Sun, 31 May 2009 23:53:55 +0000 Subject: [PATCH] Better do an explicit check for D-I syslinux config version --- tools/boot/squeeze/boot-x86 | 15 +++++++++++---- tools/boot/squeeze/x86-desktop.sh | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/boot/squeeze/boot-x86 b/tools/boot/squeeze/boot-x86 index 24a8cea7..7f76eba0 100644 --- a/tools/boot/squeeze/boot-x86 +++ b/tools/boot/squeeze/boot-x86 @@ -208,10 +208,17 @@ if [ "$THISTYPE" = "isolinux" ]; then # Isolinux setup including config and help files comes from d-i. cat cdrom/debian-cd_info.tar.gz | (cd boot$N/isolinux/; tar zx) - if [ "$(di_config_version)" = "1.0" ]; then - echo "Error: syslinux config version 1.0 is no longer supported" - exit 1 - fi + di_syslinux_ver="$(di_syslinux_version)" + case "$di_syslinux_ver" in + 2.0) + : ;; + 1.*) + echo "Error: syslinux config versions before 2.0 are not supported" + exit 1 ;; + *) + echo "Error: unrecognized syslinux config version '$di_syslinux_ver'" + exit 1 ;; + esac # Not everything in the tarball is isolinux stuff if [ -e boot$N/isolinux/win32-loader.ini ] ; then diff --git a/tools/boot/squeeze/x86-desktop.sh b/tools/boot/squeeze/x86-desktop.sh index ff0e9e8e..07abb3fd 100644 --- a/tools/boot/squeeze/x86-desktop.sh +++ b/tools/boot/squeeze/x86-desktop.sh @@ -1,7 +1,7 @@ # Functions to convert isolinux config to allow selection of desktop # environment for certain images. -di_config_version() { +di_syslinux_version() { local version version=$(sed -nr "s/^# D-I config version ([0-9.])/\1/p" \ boot$N/isolinux/isolinux.cfg)