1 #!/bin/sh i like colors :)
3 # the following variables are available in the template:
5 # $INTERFACE_ (interface for the terminalserver)
6 # $IP_ (ip for the terminalserver to bind)
7 # $NETMASK_ (network mask)
9 # $NAMESERVERS_ (nameservers for the nodes)
10 # $IPRANGE_FROM_ (user configured iprange, first ip)
11 # $IPRANGE_TO_ (user configured iprange, last ip)
12 # $NETWORK_ (first ip in this subnet)
13 # $OPTIONS_ (options for grml-terminalserver)
14 # $BOOT_ARGS_ (boot arguments for the nodes)
17 # templates are shellscript fragments and will be sourced from the
23 # default boot arguments used for both grub and pxelinux
24 default_boot_args_="ramdisk_size=16384 root=/dev/ram0 rw \
25 init=/etc/init nfsdir=$IP_:$MOUNT_POINT_ nodhcp noprompt noeject \
28 # special boot arguments required by grub
29 grub_def_boot_args_="/linux26 $default_boot_args_"
31 # special boot arguments required by pxelinux
32 pxe_def_boot_args_="$default_boot_args_ initrd=minirt26.gz"
34 # default arguments for framebuffer console
35 def_fb_args_="video=vesafb:ypan,1024x768-16@60"
36 no_fb_args_="video=ofonly"
42 cat >"$TFTPD_DATA_DIR_/menu.lst" <<EOT
47 kernel $grub_def_boot_args_ $def_fb_args_ $BOOT_ARGS_
50 title GRML no framebuffer
52 kernel $grub_def_boot_args_ $no_fb_args_ $BOOT_ARGS_
56 kernel $grub_def_boot_args_ small $def_fb_args_ $BOOT_ARGS_
61 kernel $grub_def_boot_args_ small $no_fb_args_ $BOOT_ARGS_
66 kernel $grub_def_boot_args_ debuginitrd $def_fb_args_ $BOOT_ARGS_
69 title GRML debuginit nofb
71 kernel $grub_def_boot_args_ debuginitrd $no_fb_args_ $BOOT_ARGS_
76 kernel $grub_def_boot_args_ $no_fb_args_
84 configfile (nd)/menu.lst
91 ## create pxelinux config
94 cat >"$TFTPD_DATA_DIR_/pxelinux.cfg/default" <<EOT
96 APPEND $pxe_def_boot_args_ $def_fb_args_ $BOOT_ARGS_
103 APPEND $pxe_def_boot_args_ $def_fb_args_ $BOOT_ARGS_
106 APPEND $pxe_def_boot_args_ video=nofb $BOOT_ARGS_
109 APPEND $pxe_def_boot_args_ small $def_fb_args_ $BOOT_ARGS_
112 APPEND $pxe_def_boot_args_ small video=nofb $BOOT_ARGS_
115 APPEND $pxe_def_boot_args_ debuginit $def_fb_args_ $BOOT_ARGS_
118 APPEND $pxe_def_boot_args_ debuginit video=nofb $BOOT_ARGS_
121 APPEND $pxe_def_boot_args_ video=nofb