X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=templates%2Fdhcpd_config;h=824b42e443abe57d1670bca365733ad2285f2b41;hb=65cff8890bb1d209050addbecfdf64388b9604f9;hp=56badbcf0b2b2c4f06f6f21affa45704f990dc51;hpb=0696e9c985b9324d559845aa67642c7dcb020d54;p=grml-terminalserver.git diff --git a/templates/dhcpd_config b/templates/dhcpd_config index 56badbc..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_" <