Commit 2bd451ef authored by Angel L. Mateo's avatar Angel L. Mateo Committed by Angel L. Mateo
Browse files

Fix client template when used from freeradius::statusclient

When the template is used from freeradius::statusclient there are some
parameteres (require_message_authenticator) that are not set, so this condition
must be considered in the template.
parent ebe9ee2e
...@@ -6,7 +6,7 @@ client <%= @shortname %> { ...@@ -6,7 +6,7 @@ client <%= @shortname %> {
secret = "<%= @secret %>" secret = "<%= @secret %>"
<% if @virtual_server %>virtual_server = <%= @virtual_server %><% end %> <% if @virtual_server %>virtual_server = <%= @virtual_server %><% end %>
<% if @nastype %>nas_type = <%= @nastype %><% end %> <% if @nastype %>nas_type = <%= @nastype %><% end %>
require_message_authenticator = <%= @require_message_authenticator %> <% if @require_message_authenticator %>require_message_authenticator = <%= @require_message_authenticator %><% end %>
<% if @login %>login = <%= @login %><% end %> <% if @login %>login = <%= @login %><% end %>
<% if @password %>password = <%= @password %><% end %> <% if @password %>password = <%= @password %><% end %>
<% if @coa_server %>coa_server = <%= @coa_server %><% end %> <% if @coa_server %>coa_server = <%= @coa_server %><% end %>
...@@ -18,14 +18,14 @@ client <%= @shortname %> { ...@@ -18,14 +18,14 @@ client <%= @shortname %> {
<% if @idle_timeout %>idle_timeout = <%= @idle_timeout %><% end %> <% if @idle_timeout %>idle_timeout = <%= @idle_timeout %><% end %>
} }
<%- end -%> <%- end -%>
<%- if !@attributes.empty? -%> <%- if @attributes and !@attributes.empty? -%>
<%- if @attributes.respond_to?('join') -%> <%- if @attributes.respond_to?('join') -%>
<%= @attributes.join("\n ") %> <%= @attributes.join("\n ") %>
<%- elsif @attributes.is_a?(Hash) -%> <%- elsif @attributes.is_a?(Hash) -%>
<%- @attributes.sort.each do |k, v| -%> <%- @attributes.sort.each do |k, v| -%>
<%= k %> = <%= v %> <%= k %> = <%= v %>
<%- end -%> <%- end -%>
<%- else -%> <%- elsif @attributes -%>
<%= @attributes %> <%= @attributes %>
<%- end -%> <%- end -%>
<%- end -%> <%- end -%>
......
Supports Markdown
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