/[smeserver]/rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-adjust-for-samba-tdb-locations.patch
ViewVC logotype

Contents of /rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-adjust-for-samba-tdb-locations.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Mar 17 18:38:25 2010 UTC (14 years, 7 months ago) by snetram
Branch: MAIN
* Wed Mar 17 2010 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-31.sme
- Adjust backup routines for relocation of samba .tdb files [SME: 5857]

1 diff -up e-smith-backup-2.2.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm.adjust-for-samba-tdb-locations e-smith-backup-2.2.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm
2 --- e-smith-backup-2.2.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm.adjust-for-samba-tdb-locations 2007-09-05 21:45:52.000000000 +0200
3 +++ e-smith-backup-2.2.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm 2010-03-17 19:04:01.000000000 +0100
4 @@ -81,7 +81,7 @@ sub restore_list
5 'etc/shadow',
6 'etc/group',
7 'etc/gshadow',
8 - 'etc/samba/secrets.tdb',
9 + 'var/lib/samba/private/secrets.tdb',
10 'etc/samba/smbpasswd',
11 'etc/smbpasswd',
12 );
13 @@ -327,30 +327,30 @@ sub relocate_samba_file
14 {
15 my ($self, $filename) = @_;
16
17 - return if ( -l "/etc/$filename" and -f "/etc/samba/$filename" );
18 + return if ( -l "/etc/$filename" and -f "/var/cache/samba/$filename" );
19
20 - unlink "/etc/samba/$filename" if ( -l "/etc/samba/$filename");
21 + unlink "/etc/samba/$filename" if ( -l "/var/cache/samba/$filename");
22
23 - if ( -f "/etc/$filename" and -f "/etc/samba/$filename" )
24 + if ( -f "/etc/$filename" and -f "/var/cache/samba/$filename" )
25 {
26 - warn "/etc/$filename and /etc/samba/$filename exist - preserving /etc/samba/$filename.$$\n";
27 + warn "/etc/$filename and /var/cache/samba/$filename exist - preserving /var/cache/samba/$filename.$$\n";
28
29 - move "/etc/samba/$filename", "/etc/samba/$filename.$$" or
30 - warn "Couldn't move /etc/samba/$filename to /etc/samba/$filename.$$\n";
31 + move "/var/cache/samba/$filename", "/var/cache/samba/$filename.$$" or
32 + warn "Couldn't move /var/cache/samba/$filename to /var/cache/samba/$filename.$$\n";
33 }
34
35 if ( -f "/etc/$filename" )
36 {
37 - unlink "/etc/samba/$filename" if ( -l "/etc/samba/$filename" );
38 + unlink "/var/cache/samba/$filename" if ( -l "/var/cache/samba/$filename" );
39
40 - move "/etc/$filename", "/etc/samba/$filename" or
41 - warn "Couldn't move /etc/$filename to /etc/samba/$filename\n";
42 + move "/etc/$filename", "/var/cache/samba/$filename" or
43 + warn "Couldn't move /etc/$filename to /var/cache/samba/$filename\n";
44
45 }
46
47 unless ( -l "/etc/$filename" )
48 {
49 - symlink "/etc/samba/$filename", "/etc/$filename";
50 + symlink "/var/cache/samba/$filename", "/etc/$filename";
51 }
52 }
53

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed