aboutsummaryrefslogtreecommitdiff
path: root/templates/subnet.conf.erb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/subnet.conf.erb')
-rw-r--r--templates/subnet.conf.erb16
1 files changed, 12 insertions, 4 deletions
diff --git a/templates/subnet.conf.erb b/templates/subnet.conf.erb
index 11f9ed4..9592a4c 100644
--- a/templates/subnet.conf.erb
+++ b/templates/subnet.conf.erb
@@ -19,10 +19,18 @@ subnet <%= @name %> netmask <%= _netmask %> {
scope.function_validate_re([_domain_name, '^\S+$']) -%>
option domain-name "<%= _domain_name %>";
<% unless @other_opts.empty? -%>
- <% if @other_opts.is_a?(Array) -%>
-<%= @other_opts.collect! {|i| " #{i};"}.join("\n") %>
- <% else -%>
+<%
+if @other_opts.is_a?(Array)
+ @other_opts.each do |i|
+ if i =~ /(\{|\})/
+-%>
+ <%= i %>
+<%- else -%>
+ <%= i %>;
+<% end -%>
+<% end -%>
+<% else -%>
<%= @other_opts %>;
- <% end -%>
+<% end -%>
<% end -%>
}