1 |
diff -ruN e-smith-samba-2.4.0.old/root/etc/e-smith/db/configuration/migrate/20smb e-smith-samba-2.4.0/root/etc/e-smith/db/configuration/migrate/20smb |
2 |
--- e-smith-samba-2.4.0.old/root/etc/e-smith/db/configuration/migrate/20smb 2013-01-31 13:31:40.000000000 -0800 |
3 |
+++ e-smith-samba-2.4.0/root/etc/e-smith/db/configuration/migrate/20smb 1969-12-31 16:00:00.000000000 -0800 |
4 |
@@ -1,60 +0,0 @@ |
5 |
-{ |
6 |
- my $smb = $DB->get('smb'); |
7 |
- return unless $smb; |
8 |
- |
9 |
- my %new_props = (); |
10 |
- |
11 |
- foreach my $prop (qw(RoamingProfiles ServerName Workgroup)) |
12 |
- { |
13 |
- my $old = $DB->get("Samba$prop"); |
14 |
- if (defined $old) |
15 |
- { |
16 |
- $new_props{$prop} = $old->value; |
17 |
- $old->delete; |
18 |
- } |
19 |
- } |
20 |
- |
21 |
- foreach my $prop (qw(DomainMaster)) |
22 |
- { |
23 |
- my $old = $DB->get("Samba$prop"); |
24 |
- if (defined $old) |
25 |
- { |
26 |
- $new_props{ServerRole} = 'PDC' unless $old eq 'no'; |
27 |
- $old->delete; |
28 |
- } |
29 |
- } |
30 |
- |
31 |
- foreach my $prop (qw(DomainMaster)) |
32 |
- { |
33 |
- my $old = $smb->prop($prop); |
34 |
- if (defined $old) |
35 |
- { |
36 |
- $new_props{ServerRole} = 'PDC' unless $old eq 'no'; |
37 |
- $smb->delete_prop($prop); |
38 |
- } |
39 |
- } |
40 |
- |
41 |
- ###Migrage CharacterSet->DisplayCharSet |
42 |
- my $CharacterSet = $smb->prop('CharacterSet'); |
43 |
- if ($CharacterSet) |
44 |
- { |
45 |
- $new_props{DisplayCharSet} = $CharacterSet; |
46 |
- $smb->delete_prop('CharacterSet'); |
47 |
- } |
48 |
- |
49 |
- ###Migrate ClientCodePage->DosCharSet & UnixCharSet |
50 |
- my $ClientCodePage = $smb->prop('ClientCodePage'); |
51 |
- if ($ClientCodePage) |
52 |
- { |
53 |
- $new_props{DosCharSet} = |
54 |
- $new_props{UnixCharSet} = $ClientCodePage; |
55 |
- $smb->delete_prop('ClientCodePage'); |
56 |
- } |
57 |
- |
58 |
- if ($smb->prop('status') and not $smb->prop('UnixCharSet')) |
59 |
- { |
60 |
- $new_props{UnixCharSet} ||= 'ISO8859-1'; |
61 |
- } |
62 |
- |
63 |
- $smb->merge_props(%new_props); |
64 |
-} |