-#!/bin/sh i like colors :)
-#
# the following variables are available in the template:
#
# $INTERFACE_ (interface for the terminalserver)
date_=`execute date warn`
+# insert commas when having multiple nameservers
+if [ -n "$NAMESERVERS_" ]; then
+ DNS_LINE_="option domain-name-servers $(echo "$NAMESERVERS_" | sed -e 's/\([0-9]\) \([0-9]\)/\1, \2/g');"
+fi
+# note: we don't support multiple routers options
+if [ -n "$GW_" ]; then
+ ROUTERS_LINE_="option routers $GW_;"
+fi
+
cat >"$DHCPD_CONFIG_FILE_" <<EOT
# ${DHCPD_CONFIG_FILE_##/*/} for GRML terminalserver
# created on $date_
+# THIS IS A GENERATED CONFIG FROM GRML-TERMINALSERVER, DO NOT EDIT!!!
+# better adapt $TEMPLATE_CONFIG_DIR_/dhcpd_config to your needs and update config
+# with grml-terminalserver config dhcp
+#
+# If you really want to edit _this_ file remove the next line
+# __PLEASE_UPDATE_THIS_FILE__
# global settings
allow booting;
else { filename "pxelinux.0"; }
# option subnet-mask $NETMASK_;
range $IPRANGE_FROM_ $IPRANGE_TO_;
+ $ROUTERS_LINE_
+ $DNS_LINE_
# option T150 "/menu.lst";
# option option-150 "(nd)/menu.lst";
}