1 |
wellsi |
1.1 |
diff -ruN e-smith-backup-2.2.0.old/root/etc/e-smith/web/functions/backup e-smith-backup-2.2.0/root/etc/e-smith/web/functions/backup |
2 |
|
|
--- e-smith-backup-2.2.0.old/root/etc/e-smith/web/functions/backup 2010-07-08 09:00:54.000000000 +0100 |
3 |
|
|
+++ e-smith-backup-2.2.0/root/etc/e-smith/web/functions/backup 2010-07-09 08:34:17.000000000 +0100 |
4 |
|
|
@@ -2075,8 +2075,7 @@ |
5 |
|
|
my $complete = 0; |
6 |
|
|
while (<RD>) |
7 |
|
|
{ |
8 |
|
|
- $complete++ if /etc\/smbpasswd$/; |
9 |
|
|
- $complete++ if /etc\/samba\/smbpasswd$/; # >6.0 base |
10 |
|
|
+ $complete++ if /etc\/samba\/smbpasswd$/; |
11 |
|
|
print "<li>$_</li>\n"; |
12 |
|
|
} |
13 |
|
|
|
14 |
|
|
@@ -2424,7 +2423,6 @@ |
15 |
|
|
my $complete = 0; |
16 |
|
|
while (<RD>) |
17 |
|
|
{ |
18 |
|
|
- $complete++ if /etc\/smbpasswd$/; |
19 |
|
|
$complete++ if /etc\/samba\/smbpasswd$/; |
20 |
|
|
print "<li>$_</li>\n"; |
21 |
|
|
} |
22 |
|
|
diff -ruN e-smith-backup-2.2.0.old/root/usr/lib/perl5/site_perl/esmith/Backup.pm e-smith-backup-2.2.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm |
23 |
|
|
--- e-smith-backup-2.2.0.old/root/usr/lib/perl5/site_perl/esmith/Backup.pm 2010-07-08 09:00:54.000000000 +0100 |
24 |
|
|
+++ e-smith-backup-2.2.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm 2010-07-09 08:27:40.000000000 +0100 |
25 |
|
|
@@ -316,43 +316,6 @@ |
26 |
|
|
return 1; |
27 |
|
|
} |
28 |
|
|
|
29 |
|
|
-=head2 relocate_samba_file |
30 |
|
|
- |
31 |
|
|
-Relocate a samba auxiliary file from /etc to /etc/samba |
32 |
|
|
- |
33 |
|
|
-=cut |
34 |
|
|
- |
35 |
|
|
-sub relocate_samba_file |
36 |
|
|
-{ |
37 |
|
|
- my ($self, $filename) = @_; |
38 |
|
|
- |
39 |
|
|
- return if ( -l "/etc/$filename" and -f "/etc/samba/$filename" ); |
40 |
|
|
- |
41 |
|
|
- unlink "/etc/samba/$filename" if ( -l "/etc/samba/$filename"); |
42 |
|
|
- |
43 |
|
|
- if ( -f "/etc/$filename" and -f "/etc/samba/$filename" ) |
44 |
|
|
- { |
45 |
|
|
- warn "/etc/$filename and /etc/samba/$filename exist - preserving /etc/samba/$filename.$$\n"; |
46 |
|
|
- |
47 |
|
|
- move "/etc/samba/$filename", "/etc/samba/$filename.$$" or |
48 |
|
|
- warn "Couldn't move /etc/samba/$filename to /etc/samba/$filename.$$\n"; |
49 |
|
|
- } |
50 |
|
|
- |
51 |
|
|
- if ( -f "/etc/$filename" ) |
52 |
|
|
- { |
53 |
|
|
- unlink "/etc/samba/$filename" if ( -l "/etc/samba/$filename" ); |
54 |
|
|
- |
55 |
|
|
- move "/etc/$filename", "/etc/samba/$filename" or |
56 |
|
|
- warn "Couldn't move /etc/$filename to /etc/samba/$filename\n"; |
57 |
|
|
- |
58 |
|
|
- } |
59 |
|
|
- |
60 |
|
|
- unless ( -l "/etc/$filename" ) |
61 |
|
|
- { |
62 |
|
|
- symlink "/etc/samba/$filename", "/etc/$filename"; |
63 |
|
|
- } |
64 |
|
|
-} |
65 |
|
|
- |
66 |
|
|
=head2 save_system_files |
67 |
|
|
|
68 |
|
|
Save away system files which get cobbered by a restore |
69 |
|
|
@@ -420,10 +383,6 @@ |
70 |
|
|
warn "Skipping group file merge\n"; |
71 |
|
|
} |
72 |
|
|
|
73 |
|
|
- $self->relocate_samba_file("smbpasswd"); |
74 |
|
|
- |
75 |
|
|
- $self->relocate_samba_file("secrets.tdb"); |
76 |
|
|
- |
77 |
|
|
my $now = time(); |
78 |
|
|
|
79 |
|
|
foreach my $file ( $self->restore_list ) |