Update exportedVars for LL::NG 1.4

tags/0.2.6_el5 0.2.6_el5
Daniel Berteaud 10 years ago
parent 5f61dd75cd
commit 953d346c40
  1. 13
      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"}); } unless ($conf->{'locationRules'}->{"sso-manager.$domain"});
# Add default exported var # Add default exported var
$conf->{'exportedVars'}->{'mail'} = 'preferredMail' if ($conf->{'exportedVars'}->{'mail'} eq 'mail'); $conf->{'ldapExportedVars'}->{'mail'} = 'preferredMail' if ($conf->{'ldapExportedVars'}->{'mail'} eq 'mail');
$conf->{'exportedVars'}->{'extension'} = 'extensionNumber' unless ($conf->{'exportedVars'}->{'extension'}); $conf->{'ldapExportedVars'}->{'extension'} = 'extensionNumber' unless ($conf->{'ldapExportedVars'}->{'extension'});
$conf->{'exportedVars'}->{'nom'} = 'sn' unless ($conf->{'exportedVars'}->{'nom'}); $conf->{'ldapExportedVars'}->{'nom'} = 'sn' unless ($conf->{'ldapExportedVars'}->{'nom'});
$conf->{'exportedVars'}->{'prenom'} = 'givenName' unless ($conf->{'exportedVars'}->{'prenom'}); $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 # Initialize a random key
$conf->{'key'} = join( '', map { chr( int( rand(94) ) + 33 ) } ( 1 .. 16 ) ) unless ($conf->{'key'}); $conf->{'key'} = join( '', map { chr( int( rand(94) ) + 33 ) } ( 1 .. 16 ) ) unless ($conf->{'key'});

Loading…
Cancel
Save