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