aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorCédric Jeanneret <cedric.jeanneret@camptocamp.com>2010-12-01 12:33:27 +0100
committerCédric Jeanneret <cedric.jeanneret@camptocamp.com>2010-12-01 12:33:27 +0100
commitd196542f6a0c9914999b0a2413027d5c6ead70e5 (patch)
treec654e8043d7a03ff95ccb40d8d67efef7a560160 /templates
parentf156567a335c6b6bfe3ea578ad73b5c7ae707a02 (diff)
downloadpuppet-dhcp-d196542f6a0c9914999b0a2413027d5c6ead70e5.tar.gz
puppet-dhcp-d196542f6a0c9914999b0a2413027d5c6ead70e5.tar.bz2
dhcp - updated and corrected template for subnet
Diffstat (limited to 'templates')
-rw-r--r--templates/subnet.conf.erb10
1 files changed, 7 insertions, 3 deletions
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 -%>
}