Changeset 575
- Timestamp:
- 01/06/10 08:01:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/import/epo.pl
r571 r575 40 40 $changes{sn} = $passwd[0]; 41 41 $changes{sn} =~ s/_/ /g; 42 $changes{givenName} = $passwd[1]; 43 $changes{givenName} =~ s/_/ /g; 42 if ($passwd[1] ne 'Compte-de-service') { 43 $changes{givenName} = $passwd[1]; 44 $changes{givenName} =~ s/_/ /g; 45 } 44 46 if ($passwd[10] =~ /^NICK(.*)$/) { 45 47 if ($1 eq 'zzz') { … … 47 49 } else { $changes{nickname} = $1 } 48 50 } 49 $changes{mail} = $passwd[9]; 50 $changes{mail} =~ s/cetp.ipsl.fr/latmos.ipsl.fr/; 51 52 if ($passwd[1] ne 'Compte-de-service') { 53 $changes{mail} = $passwd[13]; 54 $changes{mail} =~ s/cetp.ipsl.fr/latmos.ipsl.fr/; 55 } 51 56 } 52 57 … … 58 63 59 64 65 if ($passwd[1] ne 'Compte-de-service') { 60 66 foreach my $col (3, 5, 7) { 61 67 if($passwd[$col] ne 'AJETER') { … … 72 78 /^SAV$/i and do { 73 79 $param{site} = 'VerriÚres'; 74 $passwd[1 4] =~ /aerov/ and $param{isMainAddress} = 1;80 $passwd[18] =~ /aerov/ and $param{isMainAddress} = 1; 75 81 last; 76 82 }; 77 83 /^Vel$/i and do { 78 84 $param{site} = 'Vélizy'; 79 $passwd[1 4] =~ /cetp/ and $param{isMainAddress} = 1;85 $passwd[18] =~ /cetp/ and $param{isMainAddress} = 1; 80 86 last; 81 87 }; … … 86 92 /^SAJ$/i and do { 87 93 $param{site} = 'Jussieu'; 88 $passwd[1 4] =~ /aero$/ and $param{isMainAddress} = 1;94 $passwd[18] =~ /aero$/ and $param{isMainAddress} = 1; 89 95 last; 90 96 }; … … 113 119 $changes{grade} = $1; 114 120 }; 121 } # Not compte-de-service 122 else { 123 $changes{grade} = undef, 124 $changes{expire} = undef; 125 $changes{description} = "$passwd[1] $passwd[0]"; 126 } 115 127 } 116 128 117 129 { 118 130 my @group = @{ $obj->get_c_field('memberOf') || []}; 119 foreach ($passwd[20] =~ /^DOM(.*)/g) { 120 $changes{departement} = '$1'; 121 push @group, $1; 131 foreach (split('DOM', $passwd[19])) { 132 $_ or next; 133 $changes{department} ||= $_; 134 push @group, $_; 122 135 next; 136 } 137 foreach (split('CEL', $passwd[20])) { 138 $_ or next; 139 push @group, $_; 123 140 } 124 141 $changes{'memberOf'} = \@group;
Note: See TracChangeset
for help on using the changeset viewer.