From ad54680dca9af7d79b6df076a87302f424f6ad87 Mon Sep 17 00:00:00 2001 From: Jason Lavoie Date: Tue, 10 May 2016 13:58:58 -0400 Subject: [PATCH 1/2] add ldap_maps hash --- templates/nslcd.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/nslcd.erb b/templates/nslcd.erb index 79f62e1..3c695bd 100644 --- a/templates/nslcd.erb +++ b/templates/nslcd.erb @@ -47,7 +47,9 @@ filter <%= map %> <%= filter %> <% if @ldap_maps.length > 0 -%> # Custom maps -<% @ldap_maps.sort.each do |key, value| -%> -map <%= key %> <%= value %> -<% end -%> +<% @ldap_maps.each do |map, a| -%> +<% a.each do |attribute, newattribute| -%> +map <%= map %> <%= attribute %> <%= newattribute %> +<% end -%> +<% end -%> <% end -%> From ebcc72d714b16ea72c408e9dfd0c4665be7cf3d7 Mon Sep 17 00:00:00 2001 From: Jason Lavoie Date: Tue, 12 Jul 2016 08:50:44 -0400 Subject: [PATCH 2/2] change variable name; sort hash keys --- templates/nslcd.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/nslcd.erb b/templates/nslcd.erb index 3c695bd..6c760d6 100644 --- a/templates/nslcd.erb +++ b/templates/nslcd.erb @@ -47,8 +47,8 @@ filter <%= map %> <%= filter %> <% if @ldap_maps.length > 0 -%> # Custom maps -<% @ldap_maps.each do |map, a| -%> -<% a.each do |attribute, newattribute| -%> +<% @ldap_maps.sort.each do |map, attributes| -%> +<% attributes.sort.each do |attribute, newattribute| -%> map <%= map %> <%= attribute %> <%= newattribute %> <% end -%> <% end -%>