/[smeserver]/rpms/e-smith-base/sme8/e-smith-base-5.2.0-list-only-write-enabled-backup-targets.patch
ViewVC logotype

Contents of /rpms/e-smith-base/sme8/e-smith-base-5.2.0-list-only-write-enabled-backup-targets.patch

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


Revision 1.1 - (show annotations) (download)
Mon Mar 14 10:36:05 2011 UTC (13 years, 7 months ago) by snetram
Branch: MAIN
CVS Tags: e-smith-base-5_2_0-67_el5_sme, e-smith-base-5_2_0-71_el5_sme, e-smith-base-5_2_0-68_el5_sme, e-smith-base-5_2_0-77_el5_sme, e-smith-base-5_2_0-59_el5_sme, e-smith-base-5_2_0-78_el5_sme, e-smith-base-5_2_0-86_el5_sme, e-smith-base-5_2_0-76_el5_sme, e-smith-base-5_2_0-84_el5_sme, e-smith-base-5_2_0-65_el5_sme, e-smith-base-5_2_0-88_el5_sme, e-smith-base-5_2_0-64_el5_sme, e-smith-base-5_2_0-81_el5_sme, e-smith-base-5_2_0-82_el5_sme, e-smith-base-5_2_0-89_el5_sme, e-smith-base-5_2_0-90_el5_sme, e-smith-base-5_2_0-87_el5_sme, e-smith-base-5_2_0-80_el5_sme, e-smith-base-5_2_0-70_el5_sme, e-smith-base-5_2_0-66_el5_sme, e-smith-base-5_2_0-63_el5_sme, e-smith-base-5_2_0-61_el5_sme, e-smith-base-5_2_0-60_el5_sme, e-smith-base-5_2_0-85_el5_sme, e-smith-base-5_2_0-69_el5_sme, e-smith-base-5_2_0-79_el5_sme, e-smith-base-5_2_0-72_el5_sme, e-smith-base-5_2_0-75_el5_sme, e-smith-base-5_2_0-73_el5_sme, e-smith-base-5_2_0-62_el5_sme, e-smith-base-5_2_0-74_el5_sme, e-smith-base-5_2_0-83_el5_sme
* Mon Mar 14 2011 Jonathan Martens <smeserver-contribs@snetram.nl> 5.2.0-59.sme
- Only list backup targets that are writeable [SME: 5932]

1 diff -up e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/perform_backup.pm.list-only-write-enabled-backup-targets e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/perform_backup.pm
2 --- e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/perform_backup.pm.list-only-write-enabled-backup-targets 2011-03-14 11:13:13.000000000 +0100
3 +++ e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/perform_backup.pm 2011-03-14 11:24:21.000000000 +0100
4 @@ -154,29 +154,35 @@ sub doit
5 my @labels = ();
6 foreach my $udi (qx(hal-find-by-property --key volume.fsusage --string filesystem)) {
7 $udi =~ m/^(\S+)/;
8 - my $is_mounted = qx(hal-get-property --udi $1 --key volume.is_mounted);
9
10 - if ($is_mounted eq "false\n") {
11 - my $blkdev = qx(hal-get-property --udi $1 --key block.device);
12 - $blkdev =~ m/^(\S+)/;
13 - push @dirs, $1;
14 - }
15 - if ($is_mounted eq "false\n") {
16 - my $vollbl = qx(hal-get-property --udi $1 --key volume.label);
17 - $vollbl =~ m/^(\S+)/;
18 - if ($vollbl =~ /^\s/) {$vollbl = 'nolabel';}
19 - chomp $vollbl;
20 - push @labels, lc($vollbl);
21 + my $is_readonly = qx(hal-get-property --udi $1 --key volume.is_mounted_read_only);
22 +
23 + if ($is_readonly eq "false\n") {
24 +
25 + my $is_mounted = qx(hal-get-property --udi $1 --key volume.is_mounted);
26 +
27 + if ($is_mounted eq "false\n") {
28 + my $blkdev = qx(hal-get-property --udi $1 --key block.device);
29 + $blkdev =~ m/^(\S+)/;
30 + push @dirs, $1;
31 + }
32 + if ($is_mounted eq "false\n") {
33 + my $vollbl = qx(hal-get-property --udi $1 --key volume.label);
34 + $vollbl =~ m/^(\S+)/;
35 + if ($vollbl =~ /^\s/) {$vollbl = 'nolabel';}
36 + chomp $vollbl;
37 + push @labels, lc($vollbl);
38 + }
39 }
40 }
41 unless ($dirs[0])
42 {
43 ($rc, $choice) = $console->message_page
44 (
45 - title => gettext("Backup medium not found"),
46 + title => gettext("Write enabled backup medium not found"),
47 right => gettext("Back"),
48 text =>
49 - gettext("No removable media or device found"),
50 + gettext("No removable and write enabled media or device found"),
51 );
52 goto INITIATE_BACKUP;
53 }

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