From 953d346c4001da10c1dd693da3fe2f1a13d1c489 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 2 Sep 2014 15:14:33 +0200 Subject: [PATCH] Update exportedVars for LL::NG 1.4 --- .../templates/var/lib/lemonldap-ng/conf/lmConf/007default | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/007default b/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/007default index 3eca654..f69c44c 100644 --- a/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/007default +++ b/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/007default @@ -55,10 +55,15 @@ $conf->{'locationRules'}->{"sso-manager.$domain"} = { } unless ($conf->{'locationRules'}->{"sso-manager.$domain"}); # Add default exported var -$conf->{'exportedVars'}->{'mail'} = 'preferredMail' if ($conf->{'exportedVars'}->{'mail'} eq 'mail'); -$conf->{'exportedVars'}->{'extension'} = 'extensionNumber' unless ($conf->{'exportedVars'}->{'extension'}); -$conf->{'exportedVars'}->{'nom'} = 'sn' unless ($conf->{'exportedVars'}->{'nom'}); -$conf->{'exportedVars'}->{'prenom'} = 'givenName' unless ($conf->{'exportedVars'}->{'prenom'}); +$conf->{'ldapExportedVars'}->{'mail'} = 'preferredMail' if ($conf->{'ldapExportedVars'}->{'mail'} eq 'mail'); +$conf->{'ldapExportedVars'}->{'extension'} = 'extensionNumber' unless ($conf->{'ldapExportedVars'}->{'extension'}); +$conf->{'ldapExportedVars'}->{'nom'} = 'sn' unless ($conf->{'ldapExportedVars'}->{'nom'}); +$conf->{'ldapExportedVars'}->{'prenom'} = 'givenName' unless ($conf->{'ldapExportedVars'}->{'prenom'}); + +# Remove obsolete exportedVars +foreach my $var (qw(mail nom prenom extension)){ + delete $conf->{'exportedVars'}->{$var} if $conf->{'exportedVars'}->{$var}; +} # Initialize a random key $conf->{'key'} = join( '', map { chr( int( rand(94) ) + 33 ) } ( 1 .. 16 ) ) unless ($conf->{'key'});