X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=templates%2Fgrub-pxelinux_config;h=8360ac33910b16a316f8f9f17d2fcf17e01ef069;hb=HEAD;hp=694293edd45be77b8e4d6088046755e6be178ba2;hpb=876ee70ea224ce76b0a0a24d223c2cdb490d221c;p=grml-terminalserver.git diff --git a/templates/grub-pxelinux_config b/templates/grub-pxelinux_config index 694293e..8360ac3 100644 --- a/templates/grub-pxelinux_config +++ b/templates/grub-pxelinux_config @@ -34,27 +34,27 @@ pxe_def_boot_args_="$default_boot_args_" ## create pxelinux config ### DEST_DIR=$(mktemp -d) -if [ -d /lib/live/mount/medium/boot ] ; then # since around December 2012 +if [ -d /run/live/medium ] ; then # since December 2018 grml2usb --bootloader-only \ --bootoptions="$pxe_def_boot_args_ $BOOT_ARGS_" \ --remove-bootoption=nodhcp \ - /lib/live/mount/medium "$DEST_DIR" + /run/live/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 +elif [ -d /lib/live/mount/medium ] ; then grml2usb --bootloader-only \ --bootoptions="$pxe_def_boot_args_ $BOOT_ARGS_" \ --remove-bootoption=nodhcp \ - /live/image "$DEST_DIR" + /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_" -else # there is no kernel inside /live/image copy it from /boot +else if [ ! -d /usr/share/grml-live/templates/boot/isolinux ] ; then echo "E: Could not find isolinux directory, can not operate without. @@ -94,9 +94,10 @@ fi # Copy initrd.img and vmlinuz from all directories which name begins # with grml, e.g. grml32full and grml64full # This way we can boot multiple ISOs -for filename in $(ls -d ${MULTIBOOT_PATH_}/grml*); do - cp -r ${filename} ${TFTPD_DATA_DIR_}/boot/ -done +for filename in "${MULTIBOOT_PATH_}"/grml* ; do + [ -d "$filename" ] || continue + cp -r "${filename}" "${TFTPD_DATA_DIR_}/boot/" +done config_files_=$(find "$TFTPD_DATA_DIR_/" -name "*.cfg" -type f) @@ -106,7 +107,9 @@ if [ -d "$MOUNT_POINT_"/boot/release ] ; then fi # adjust ldbsd.com bootline -sed -i -e 's#\(.*kernel .*/ldbsd.com\)#\1 set image /boot/addons/bsd4grml/bsd.rd`echo Type "boot" to load MirOS bsd4grml via keeppxe#' "$TFTPD_DATA_DIR_/"addon_*_bsd.cfg +if ls "$TFTPD_DATA_DIR_/"addon_*_bsd.cfg >/dev/null 2>&1; then + sed -i -e 's#\(.*kernel .*/ldbsd.com\)#\1 set image /boot/addons/bsd4grml/bsd.rd`echo Type "boot" to load MirOS bsd4grml via keeppxe#' "$TFTPD_DATA_DIR_/"addon_*_bsd.cfg +fi # remove grub entries rm -f "$TFTPD_DATA_DIR_/"addon_*grub*.cfg