/[smeserver]/rpms/e-smith-base/sme9/e-smith-base-5.4.0-ConsoleBackupCompressionLevel.patch
ViewVC logotype

Annotation of /rpms/e-smith-base/sme9/e-smith-base-5.4.0-ConsoleBackupCompressionLevel.patch

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


Revision 1.1 - (hide annotations) (download)
Fri Jul 5 23:16:21 2013 UTC (11 years, 3 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-base-5_4_0-60_el6_sme, e-smith-base-5_4_0-44_el6_sme, e-smith-base-5_4_0-49_el6_sme, e-smith-base-5_4_0-42_el6_sme, e-smith-base-5_4_0-43_el6_sme, e-smith-base-5_4_0-50_el6_sme, e-smith-base-5_4_0-58_el6_sme, e-smith-base-5_4_0-45_el6_sme, e-smith-base-5_4_0-57_el6_sme, e-smith-base-5_4_0-46_el6_sme, e-smith-base-5_4_0-62_el6_sme, e-smith-base-5_4_0-56_el6_sme, e-smith-base-5_4_0-52_el6_sme, e-smith-base-5_4_0-54_el6_sme, e-smith-base-5_4_0-51_el6_sme, e-smith-base-5_4_0-47_el6_sme, e-smith-base-5_4_0-55_el6_sme, e-smith-base-5_4_0-53_el6_sme, e-smith-base-5_4_0-61_el6_sme, e-smith-base-5_4_0-48_el6_sme, e-smith-base-5_4_0-59_el6_sme
* Fri Jul 5 2013 Ian Wells <esmith@wellsi.com> 5.4.0-42.sme
- Console USB Backup, allow user setting of compression level [SME: 7745]
  Compression level of the console backup is now -6 by default

1 wellsi 1.1 diff -ruN e-smith-base-5.2.0.old/root/etc/e-smith/db/configuration/defaults/backupconsole/CompressionLevel e-smith-base-5.2.0/root/etc/e-smith/db/configuration/defaults/backupconsole/CompressionLevel
2     --- e-smith-base-5.2.0.old/root/etc/e-smith/db/configuration/defaults/backupconsole/CompressionLevel 1969-12-31 16:00:00.000000000 -0800
3     +++ e-smith-base-5.2.0/root/etc/e-smith/db/configuration/defaults/backupconsole/CompressionLevel 2013-06-29 13:25:24.000000000 -0700
4     @@ -0,0 +1 @@
5     +-6
6     diff -ruN e-smith-base-5.2.0.old/root/etc/e-smith/db/configuration/defaults/backupconsole/type e-smith-base-5.2.0/root/etc/e-smith/db/configuration/defaults/backupconsole/type
7     --- e-smith-base-5.2.0.old/root/etc/e-smith/db/configuration/defaults/backupconsole/type 1969-12-31 16:00:00.000000000 -0800
8     +++ e-smith-base-5.2.0/root/etc/e-smith/db/configuration/defaults/backupconsole/type 2005-11-20 20:28:05.000000000 -0800
9     @@ -0,0 +1 @@
10     +configuration
11     diff -ruN e-smith-base-5.2.0.old/root/usr/lib/perl5/site_perl/esmith/console/perform_backup.pm e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/perform_backup.pm
12     --- e-smith-base-5.4.0.old/root/usr/share/perl5/vendor_perl/esmith/console/perform_backup.pm 2013-06-29 12:39:43.000000000 -0700
13     +++ e-smith-base-5.4.0/root/usr/share/perl5/vendor_perl/esmith/console/perform_backup.pm 2013-06-29 13:29:47.000000000 -0700
14     @@ -38,7 +38,7 @@
15    
16     sub make_backup_callback
17     {
18     - my $device = shift;
19     + my ($device, $CompressionLevel) = @_;
20     return sub {
21     my $fh = shift;
22     my @backup_list = esmith::Backup->restore_list;
23     @@ -74,11 +74,11 @@
24     my $status = 0;
25    
26     my $gzip = open(GZIP, "|-");
27     - return "could not run gzip" unless defined $gzip;
28     + return "could not run gzip" unless defined $gzip;
29     unless ($gzip)
30     {
31     close $fh;
32     - exec "gzip", "-9";
33     + exec "gzip", $CompressionLevel;
34     }
35    
36     my $pv = open(PV, "|-");
37     @@ -131,6 +131,7 @@
38     $ENV{PATH} = "/bin:/usr/bin";
39     $ENV{HOME} = "/root";
40    
41     + my $compressionLevel = $db->get_prop("backupconsole", "CompressionLevel") || "-6";
42     my ($rc, $choice) = $console->yesno_page
43     (
44     title => gettext("Create Backup to removable media"),
45     @@ -237,7 +238,7 @@
46     }
47     close DU;
48    
49     - $console->gauge(make_backup_callback("/mnt/bootstrap-console-backup"), 'title' => gettext("Creating backup file"));
50     + $console->gauge(make_backup_callback("/mnt/bootstrap-console-backup",$compressionLevel), 'title' => gettext("Creating backup file"));
51    
52     system("/bin/umount", "/mnt/bootstrap-console-backup");
53     rmdir("/mnt/bootstrap-console-backup");

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