• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/samba-3.0.25b/examples/LDAP/smbldap-tools-0.9.2/

Lines Matching refs:new

110 # read new values
111 my %new;
113 $new{'name'} = $Options{'f'};
116 $new{'office'} = $Options{'r'};
119 $new{'wphone'} = $Options{'w'};
122 $new{'hphone'} = $Options{'h'};
125 $new{'other'} = $Options{'o'};
128 $new{'shell'} = $Options{'s'};
132 print "Enter the new value, or press ENTER for the default\n";
135 $new{'shell'} = readline(*STDIN);
137 $new{'name'} = readline(*STDIN);
139 $new{'office'} = readline(*STDIN);
141 $new{'wphone'} = readline(*STDIN);
143 $new{'hphone'} = readline(*STDIN);
145 $new{'other'} = readline(*STDIN);
150 if (!$new{$key}) {
151 $new{$key} = $old{$key};
155 # simple check of new values
156 foreach my $key (keys %new) {
157 chop($new{$key}) if ( $new{$key}=~/\n$/ );
158 if ($new{$key} =~ /^\s+$/ and $key ne 'shell') {
159 $new{$key} = "";
160 } elsif ($new{$key} =~ /^$/) {
161 $new{$key} = $old{$key};
162 } elsif ($key ne 'other' and $new{$key} =~ /.*,.*/) {
166 # $new{$key} eq ""
170 if ( $new{'shell'} and !($new{'shell'}=~/^\/.+\/.+/)
173 $new{'shell'} = $old{'shell'};
174 } elsif ( $new{'shell'} and !($new{'shell'}=~/^\/.+\/.+/)
175 or !$new{'shell'} and !$old{'shell'}
177 $new{'shell'} = '/bin/sh';
180 if ( !$new{'name'} ) {
181 $new{'name'} = $user;
186 ( $new{'name'},
187 $new{'office'},
188 $new{'wphone'},
189 $new{'hphone'},
190 $new{'other'}
194 my @tmp = split(/\s+/,$new{'name'});
200 $entry->replace( 'cn' => $new{'name'} );
213 if ( $new{'office'} ) {
214 $entry->replace('roomNumber' => $new{'office'});
218 if ( $new{'wphone'} ) {
219 $entry->replace('telephoneNumber' => $new{'wphone'});
223 if ( $new{'hphone'} ) {
224 $entry->replace('homePhone' => $new{'hphone'});
229 if ( $new{'shell'} ) {
230 $entry->replace('loginShell' => $new{'shell'});