From 77804b1e60fa001a4683c7f4336b77a03601aea3 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 10 Jan 2013 13:14:07 +0100 Subject: [PATCH] Adjust live media path for new live-boot version Debian's live-boot changed the path from /live/image to /lib/live/mount/medium, so adopt our code to support those new versions without breaking older ISOs. --- config | 12 ++++++------ default_config | 8 +++++--- templates/grub-pxelinux_config | 12 +++++++++++- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/config b/config index ea86850..b7e07b1 100644 --- a/config +++ b/config @@ -26,28 +26,28 @@ #KERNEL_VERSION_="" # this is the path where the grml image/cdrom is placed (mounted) -# default: /live/image +# default: /lib/live/mount/medium #MOUNT_POINT_="" # path + name of the linux kernel you would want to boot -# default: /live/image/boot/$GRML_NAME/vmlinuz +# default: /lib/live/mount/medium/boot/$GRML_NAME/vmlinuz #KERNEL_IMAGE_="" # this is the initrd the grml-terminalserver-config edits # if the file is not found, default will be used -# default: /live/image/boot/$GRML_NAME/initrd.img +# default: /lib/live/mount/medium/boot/$GRML_NAME/initrd.img #ORIGINAL_INITRD_="" # path + name of the memtest image -# default: /live/image/boot/addons/memtest +# default: /lib/live/mount/medium/boot/addons/memtest #MEMTEST_IMAGE_="" # path to pxelinux boot message -# default: /live/image/boot/isolinux/boot.msg +# default: /lib/live/mount/medium/boot/isolinux/boot.msg #PXE_BOOT_MSG_="" # path to pxelinux boot logo -# default: /live/image/boot/isolinux/logo.16 +# default: /lib/live/mount/medium/boot/isolinux/logo.16 #PXE_BOOT_LOGO_="" # should the terminalserver activate snat for the clients to his default gateway? diff --git a/default_config b/default_config index f643b45..aee7983 100644 --- a/default_config +++ b/default_config @@ -8,10 +8,12 @@ MODULES_PATH_="/lib/modules" KERNEL_VERSION_=`uname -r` -if [ -e '/live/image' ]; then - MOUNT_POINT_="/live/image" +if [ -e /lib/live/mount/medium ] ; then + MOUNT_POINT_="/lib/live/mount/medium" # since around December 2012 +elif [ -e '/live/image' ]; then + MOUNT_POINT_="/live/image" # until around December 2012 else - MOUNT_POINT_="/cdrom" + MOUNT_POINT_="/cdrom" # very old fi # assume we have a grml2usb system diff --git a/templates/grub-pxelinux_config b/templates/grub-pxelinux_config index 59bda58..c3e99f1 100644 --- a/templates/grub-pxelinux_config +++ b/templates/grub-pxelinux_config @@ -100,7 +100,17 @@ ret_=$? ## create pxelinux config ### DEST_DIR=$(mktemp -d) -if [ -d /live/image/boot ] ; then +if [ -d /lib/live/mount/medium/boot ] ; then # since around December 2012 + grml2usb --bootloader-only \ + --bootoptions="$pxe_def_boot_args_ $BOOT_ARGS_" \ + --remove-bootoption=nodhcp \ + /lib/live/mount/medium "$DEST_DIR" + + mv "$DEST_DIR"/boot/syslinux/* "$TFTPD_DATA_DIR_/" + rmdir "$DEST_DIR"/boot/syslinux + + mv "$DEST_DIR"/boot/ "$TFTPD_DATA_DIR_" +elif [ -d /live/image/boot ] ; then # until around December 2012 grml2usb --bootloader-only \ --bootoptions="$pxe_def_boot_args_ $BOOT_ARGS_" \ --remove-bootoption=nodhcp \ -- 2.1.4