Permalink
Browse files

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.
  • Loading branch information...
1 parent 149df18 commit 77804b1e60fa001a4683c7f4336b77a03601aea3 @mika mika committed Jan 10, 2013
Showing with 22 additions and 10 deletions.
  1. +6 −6 config
  2. +5 −3 default_config
  3. +11 −1 templates/grub-pxelinux_config
View
12 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?
View
@@ -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
@@ -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 \

0 comments on commit 77804b1

Please sign in to comment.