Commit 70ae10a3 authored by Jonathan Gazeley's avatar Jonathan Gazeley
Browse files

Try different method of validating variables

Add missing if

Check variables properly
parent 919f4429
home_server <%= @name %> {
type = <%= @type %>
<% if @ipaddr != '' -%>
<% if defined?(@ipaddr) -%>
ipaddr = <%= @ipaddr %>
<% end -%>
<% if @ipv6addr != '' -%>
<% if defined?(@ipv6addr) -%>
ipv6addr = <%= @ipv6addr %>
<% end -%>
<% if @virtual_server != '' -%>
<% if defined?(@virtual_server) -%>
virtual_server = <%= @virtual_server %>
<% end -%>
port = <%= @port %>
......
home_server_pool <%= @name %> {
type = <%= @type %>
<% if @virtual_server != '' -%>
<% if defined?(@virtual_server) -%>
virtual_server = <%= @virtual_server %>
<% end -%>
<% @home_server.each do |server| -%>
home_server = <%= server %>
<% end -%>
<% if @fallback != '' -%>
<% if defined?(@fallback) -%>
fallback = <%= @fallback %>
<% end -%>
}
......
realm <%= @name %> {
<% if @virtual_server != '' -%>
<% if defined?(@virtual_server) -%>
virtual_server = <%= @virtual_server %>
<% end -%>
<% if @auth_pool != '' -%>
<% if defined?(@auth_pool) -%>
auth_pool = <%= @auth_pool %>
<% end -%>
<% if @acct_pool != '' -%>
<% if defined?(@acct_pool) -%>
acct_pool = <%= @acct_pool %>
<% end -%>
<% if @pool != '' -%>
<% if defined?(@pool) -%>
pool = <%= @pool %>
<% end %>
<% if @nostrip -%>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment