From d196542f6a0c9914999b0a2413027d5c6ead70e5 Mon Sep 17 00:00:00 2001 From: Cédric Jeanneret Date: Wed, 1 Dec 2010 12:33:27 +0100 Subject: dhcp - updated and corrected template for subnet --- templates/subnet.conf.erb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/subnet.conf.erb b/templates/subnet.conf.erb index c7c690d..4417af0 100644 --- a/templates/subnet.conf.erb +++ b/templates/subnet.conf.erb @@ -12,7 +12,7 @@ subnet <%=name%> netmask <%=netmask_eth0%> { <% end -%> <% if subnet_mask -%> option subnet-mask <%=subnet_mask%>; -<% else if netmask -%> +<% elsif netmask -%> option subnet-mask <%=netmask%>; <% else -%> option subnet-mask <%=netmask_eth0%>; @@ -23,8 +23,12 @@ subnet <%=name%> netmask <%=netmask_eth0%> { <% else -%> option domain-name "<%=domain%>"; <% end -%> - include "<%=to_inc%>"; + include "<%=to_include%>"; <% if other_opts and not other_opts.empty? -%> -<%= other_opts.collect! {|i| " #{i}" }.join(";\n") %> + <% if other_opts.is_a?(Array) -%> + <%= other_opts.join(";\n") %> + <% else -%> + <%=other_opts%>; + <% end -%> <% end -%> } -- cgit v1.2.3