/[smecontribs]/rpms/smeserver-BackupPC/contribs7/smeserver-BackupPC-0.1-pbzip2.patch
ViewVC logotype

Contents of /rpms/smeserver-BackupPC/contribs7/smeserver-BackupPC-0.1-pbzip2.patch

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


Revision 1.1 - (show annotations) (download)
Mon Nov 29 09:51:08 2010 UTC (13 years, 5 months ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-BackupPC-0_1-12_el4_sme, HEAD
* Mon Nov 29 2010 Daniel B. <daniel@firewall-services.com> 0.1-12.sme
- Support pbzip2 for archiving
- Use nice to reduce the priority of compression

1 --- smeserver-BackupPC-0.1/root/usr/share/BackupPC/lib/BackupPC/SMEarchive.pm.pbzip2 2010-11-29 10:46:15.000000000 +0100
2 +++ smeserver-BackupPC-0.1/root/usr/share/BackupPC/lib/BackupPC/SMEarchive.pm 2010-11-29 10:50:37.000000000 +0100
3 @@ -40,10 +40,11 @@
4 $path{wc} = '/usr/bin/wc';
5 $path{sudo} = '/usr/bin/sudo';
6 $path{gzip} = '/bin/gzip';
7 -$path{bzip2} = '/usr/bin/bzip2';
8 +$path{bzip2} = ( -x '/usr/bin/pbzip2' ) ? '/usr/bin/pbzip2' : '/usr/bin/bzip2';
9 $path{rsync} = '/usr/bin/rsync';
10 $path{tar} = '/bin/tar';
11 $path{openssl} = '/usr/bin/openssl';
12 +$path{nice} = '/bin/nice';
13
14 sub checkExec{
15 # On vérifie que les executables sont bien executables
16 @@ -189,10 +190,10 @@
17 foreach my $host (@hosts){
18 my $cmd = "$path{backuppcBin}/BackupPC_tarCreate -t -h $host -n $backupNum -s $share . ";
19 if (($compress eq 'gzip') || ($compress eq 'bzip2')){
20 - $cmd .= "| $path{$compress} -c ";
21 + $cmd .= "| $path{nice} -n 10 $path{$compress} -c ";
22 }
23 if (($cipher ne 'off') && (-e $key)){
24 - $cmd .= "| $path{openssl} enc -$cipher -salt -pass file:$key";
25 + $cmd .= "| $path{nice} -n 10 $path{openssl} enc -$cipher -salt -pass file:$key";
26 $extension .= '.enc';
27 }
28 if ($split eq '0'){

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