1 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-audittools-0.0.2/root/sbin/e-smith/audittools/virtualdomains2pseudonyms mezzanine_patched_smeserver-audittools-0.0.2/root/sbin/e-smith/audittools/virtualdomains2pseudonyms |
2 |
--- smeserver-audittools-0.0.2/root/sbin/e-smith/audittools/virtualdomains2pseudonyms 2006-03-30 15:19:08.091926873 +1000 |
3 |
+++ mezzanine_patched_smeserver-audittools-0.0.2/root/sbin/e-smith/audittools/virtualdomains2pseudonyms 2006-03-30 15:18:42.940220307 +1000 |
4 |
@@ -31,17 +31,31 @@ |
5 |
|
6 |
for ( <VIRTUALS> ) |
7 |
{ |
8 |
- next unless (/(.*@.*):(.*)/); |
9 |
+ next unless (/(.*@.*):\s*(\S+)\s*/); |
10 |
|
11 |
- my ($pseudo, $account) = ($1, $2); |
12 |
+ my ($pseudo, $target) = ($1, $2); |
13 |
|
14 |
my $entry = $adb->get($pseudo); |
15 |
|
16 |
if ($entry) |
17 |
{ |
18 |
+ my $account = $entry->prop("Account"); |
19 |
+ |
20 |
+ if (not $account) |
21 |
+ { |
22 |
+ warn "$pseudo Account property missing or null\n"; |
23 |
+ next; |
24 |
+ } |
25 |
+ |
26 |
+ if ($account ne $target) |
27 |
+ { |
28 |
+ warn "$pseudo=>$account, but virtualdomains=>$target \n"; |
29 |
+ next; |
30 |
+ } |
31 |
+ |
32 |
warn "$pseudo exists\n"; |
33 |
next; |
34 |
} |
35 |
|
36 |
- print "RUN: db accounts set $pseudo pseudonym Account $account\n"; |
37 |
+ print "RUN: db accounts set $pseudo pseudonym Account $target\n"; |
38 |
} |