From 7a729e09e97e0e3ca2d6a7a0051d26b0acdfb3d3 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 29 May 2009 12:55:26 +0200 Subject: [PATCH] Update /boot/grub/* files in build output --- debian/changelog | 6 +++++- grml-live | 4 ++++ templates/boot/grub/menu.lst | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index de91d6d..401527d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,8 +18,12 @@ grml-live (0.9.17) unstable; urgency=low - Drop package ifupdown-scripts-zg2 from GRML_FULL. * Set APT_LISTCHANGES_FRONTEND and APT_LISTBUGS_FRONTEND to 'none' on upgrade actions in /etc/grml/fai/config/hooks/instsoft.GRMLBASE. + * Update /boot/grub/* files in build output on every invocation of + grml-live (as we do it for isolinux stuff too), so the variables + inside menu.cfg are up2date if rebuilding the ISO. [Testing: issue676] + * Use variable for $FLAVOUR.squashfs in grub's menu.lst as well. - -- Michael Prokop Wed, 27 May 2009 17:53:11 +0200 + -- Michael Prokop Fri, 29 May 2009 12:55:05 +0200 grml-live (0.9.16) unstable; urgency=low diff --git a/grml-live b/grml-live index 90033bc..8b8ed40 100755 --- a/grml-live +++ b/grml-live @@ -569,6 +569,9 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then if ! [ -d "${BUILD_OUTPUT}/boot/grub" ] ; then cp -a ${TEMPLATE_DIRECTORY}/boot/grub "$BUILD_OUTPUT"/boot/ fi + # make sure we have recent template files available, otherwise updating + # the strings like $GRML_NAME and $VERSION might be out of date + cp ${TEMPLATE_DIRECTORY}/boot/grub/* "$BUILD_OUTPUT"/boot/grub/ if ! [ -d "${TEMPLATE_DIRECTORY}"/GRML ] ; then log "${TEMPLATE_DIRECTORY}/GRML does not exist. Exiting." @@ -603,6 +606,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then GRML_NAME_SQUASHFS="$GRML_NAME.squashfs" sed -i "s/%GRML_NAME_SQUASHFS%/$GRML_NAME_SQUASHFS/" "$BUILD_OUTPUT"/boot/isolinux/isolinux.cfg sed -i "s/%GRML_NAME_SQUASHFS%/$GRML_NAME_SQUASHFS/" "$BUILD_OUTPUT"/boot/isolinux/syslinux.cfg + sed -i "s/%GRML_NAME_SQUASHFS%/$GRML_NAME_SQUASHFS/" "$BUILD_OUTPUT"/boot/grub/menu.lst GRML_NAME_SQUASHFS="$(cut_string 20 "$GRML_NAME_SQUASHFS")" GRML_NAME_SQUASHFS="$(extend_string_end 20 "$GRML_NAME_SQUASHFS")" diff --git a/templates/boot/grub/menu.lst b/templates/boot/grub/menu.lst index 9602255..87522d0 100644 --- a/templates/boot/grub/menu.lst +++ b/templates/boot/grub/menu.lst @@ -36,7 +36,7 @@ kernel /boot/%GRML_NAME%/linux26 apm=power-off lang=us vga=791 verbose debug=vc initrd /boot/%GRML_NAME%/initrd.gz title %GRML_NAME% %VERSION% - copy grml squashfs file to RAM -kernel /boot/%GRML_NAME%/linux26 toram=grml.squashfs apm=power-off lang=us vga=791 quiet boot=live nomce +kernel /boot/%GRML_NAME%/linux26 toram=%GRML_NAME_SQUASHFS% apm=power-off lang=us vga=791 quiet boot=live nomce initrd /boot/%GRML_NAME%/initrd.gz title %GRML_NAME% %VERSION% - copy medium to RAM -- 2.1.4