X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=templates%2Fdhcpd_config;h=5bf9dedba61e8085e8edc7d75b472670e5869e1d;hb=HEAD;hp=2b847c7c1ef37692949a67ceded8e6f23beb5b08;hpb=cb91c41fae1f12087ea2426ce6e0381b26fb7331;p=grml-terminalserver.git diff --git a/templates/dhcpd_config b/templates/dhcpd_config index 2b847c7..5bf9ded 100644 --- a/templates/dhcpd_config +++ b/templates/dhcpd_config @@ -24,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_" <"$DHCPD_CONFIG_FILE_" <