Adjust configuration for new grml2usb layout; fix dirname usage
[grml-terminalserver.git] / templates / grub-pxelinux_config
index 0ee97b6..b41e7b0 100644 (file)
@@ -1,5 +1,3 @@
-#!/bin/sh i like colors :)
-#
 # the following variables are available in the template:
 #
 # $INTERFACE_     (interface for the terminalserver)
 #
 # GLOBAL_README_END
 
+if grep -q live-media-path= /proc/cmdline 2>/dev/null ; then
+    live_media_path_="live-media-path=$(awk -F live-media-path= '{print $2}' /proc/cmdline)"
+fi
 
 # default boot arguments used for both grub and pxelinux
-default_boot_args_="ramdisk_size=16384 root=/dev/ram0 rw \
+if [ -e '/live/cow' ]; then
+    default_boot_args_="root=/dev/nfs rw nfsroot=$IP_:$MOUNT_POINT_ \
+boot=live $live_media_path_ nomce quiet apm=power-off nodhcp noprompt noeject"
+else
+    default_boot_args_="ramdisk_size=24000 root=/dev/ram0 rw \
 init=/etc/init nfsdir=$IP_:$MOUNT_POINT_ nodhcp noprompt noeject \
 apm=power-off nomce"
+fi
 
 # special boot arguments required by grub
 grub_def_boot_args_="/linux26 $default_boot_args_"
@@ -116,12 +122,12 @@ APPEND $pxe_def_boot_args_ debuginit $def_fb_args_ $BOOT_ARGS_
 LABEL debuginit
 KERNEL linux26
 APPEND $pxe_def_boot_args_ debuginit $no_fb_args_ $BOOT_ARGS_
-LABEL resuce
+LABEL rescue
 KERNEL linux26
 APPEND $pxe_def_boot_args_ $no_fb_args_
 LABEL memtest
 KERNEL memtest
-APPEND initrd=
+APPEND fix
 
 EOT