X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=templates%2Fdhcpd_config;h=824b42e443abe57d1670bca365733ad2285f2b41;hb=e6de44d04958371381f368da6e923e448559065d;hp=cb5c6f23bc906f358e3e8e01455dcfc4f7350a19;hpb=055975b3aea224603a1f93366dc25c856e4d80fd;p=grml-terminalserver.git diff --git a/templates/dhcpd_config b/templates/dhcpd_config index cb5c6f2..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) @@ -26,8 +24,13 @@ date_=`execute date warn` # insert commas when having multiple nameservers -DNS_=$(echo "$NAMESERVERS_" | sed -e 's/\([0-9]\) \([0-9]\)/\1, \2/g') +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_" <