X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=templates%2Fdhcpd_config;h=824b42e443abe57d1670bca365733ad2285f2b41;hb=65cff8890bb1d209050addbecfdf64388b9604f9;hp=34fe065f9c437141a8c13fcd6d95326a33b6fac4;hpb=38520e623a2dcbf60a39f1b201f9a0bb0739c66d;p=grml-terminalserver.git diff --git a/templates/dhcpd_config b/templates/dhcpd_config index 34fe065..824b42e 100644 --- a/templates/dhcpd_config +++ b/templates/dhcpd_config @@ -1,5 +1,3 @@ -#!/bin/sh i like colors :) -# # the following variables are available in the template: # # $INTERFACE_ (interface for the terminalserver) @@ -25,9 +23,24 @@ 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_" <