X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=templates%2Fdhcpd_config;h=824b42e443abe57d1670bca365733ad2285f2b41;hb=393501a913872e87da98e57e33bc3d7bba8128a6;hp=2b847c7c1ef37692949a67ceded8e6f23beb5b08;hpb=58b2b0446f39c1b038b6ffa9e9fb15f1901e303f;p=grml-terminalserver.git diff --git a/templates/dhcpd_config b/templates/dhcpd_config index 2b847c7..824b42e 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_" <