/[smeserver]/rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-perform_backup-hal.patch
ViewVC logotype

Contents of /rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-perform_backup-hal.patch

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


Revision 1.1 - (show annotations) (download)
Sun Jan 31 05:22:09 2010 UTC (14 years, 9 months ago) by dungog
Branch: MAIN
CVS Tags: e-smith-backup-2_2_0-62_el5_sme, e-smith-backup-2_2_0-30_el5_sme, e-smith-backup-2_2_0-72_el5_sme, e-smith-backup-2_2_0-40_el5_sme, e-smith-backup-2_2_0-27_el5_sme, e-smith-backup-2_2_0-60_el5_sme, e-smith-backup-2_2_0-26_el5_sme, e-smith-backup-2_2_0-66_el5_sme, e-smith-backup-2_2_0-65_el5_sme, e-smith-backup-2_2_0-80_el5_sme, e-smith-backup-2_2_0-44_el5_sme, e-smith-backup-2_2_0-83_el5_sme, e-smith-backup-2_2_0-41_el5_sme, e-smith-backup-2_2_0-52_el5_sme, e-smith-backup-2_2_0-82_el5_sme, e-smith-backup-2_2_0-38_el5_sme, e-smith-backup-2_2_0-88_el5_sme, e-smith-backup-2_2_0-74_el5_sme, e-smith-backup-2_2_0-55_el5_sme, e-smith-backup-2_2_0-84_el5_sme, e-smith-backup-2_2_0-63_el5_sme, e-smith-backup-2_2_0-87_el5_sme, e-smith-backup-2_2_0-64_el5_sme, e-smith-backup-2_2_0-43_el5_sme, e-smith-backup-2_2_0-48_el5_sme, e-smith-backup-2_2_0-36_el5_sme, e-smith-backup-2_2_0-81_el5_sme, e-smith-backup-2_2_0-68_el5_sme, e-smith-backup-2_2_0-35_el5_sme, e-smith-backup-2_2_0-86_el5_sme, e-smith-backup-2_2_0-34_el5_sme, e-smith-backup-2_2_0-50_el5_sme, e-smith-backup-2_2_0-51_el5_sme, e-smith-backup-2_2_0-71_el5_sme, e-smith-backup-2_2_0-61_el5_sme, e-smith-backup-2_2_0-57_el5_sme, e-smith-backup-2_2_0-78_el5_sme, e-smith-backup-2_2_0-73_el5_sme, e-smith-backup-2_2_0-79_el5_sme, e-smith-backup-2_2_0-39_el5_sme, e-smith-backup-2_2_0-33_el5_sme, e-smith-backup-2_2_0-75_el5_sme, e-smith-backup-2_2_0-28_el5_sme, e-smith-backup-2_2_0-76_el5_sme, e-smith-backup-2_2_0-56_el5_sme, e-smith-backup-2_2_0-58_el5_sme, e-smith-backup-2_2_0-45_el5_sme, e-smith-backup-2_2_0-59_el5_sme, e-smith-backup-2_2_0-32_el5_sme, e-smith-backup-2_2_0-53_el5_sme, e-smith-backup-2_2_0-67_el5_sme, e-smith-backup-2_2_0-42_el5_sme, e-smith-backup-2_2_0-29_el5_sme, e-smith-backup-2_2_0-70_el5_sme, e-smith-backup-2_2_0-77_el5_sme, e-smith-backup-2_2_0-54_el5_sme, e-smith-backup-2_2_0-85_el5_sme, e-smith-backup-2_2_0-69_el5_sme, e-smith-backup-2_2_0-37_el5_sme, e-smith-backup-2_2_0-31_el5_sme, e-smith-backup-2_2_0-49_el5_sme, e-smith-backup-2_2_0-47_el5_sme, e-smith-backup-2_2_0-46_el5_sme, HEAD
* Sun Jan 31 2010 Stephen Noble <support@dungog.net> 2.2.0-26.sme
- Fix mounting usb disks [SME: 4809]

1 diff -urN e-smith-backup-2.2.0.po/root/etc/e-smith/db/configuration/migrate/30lcSmbShare e-smith-backup-2.2.0.new/root/etc/e-smith/db/configuration/migrate/30lcSmbShare
2 --- e-smith-backup-2.2.0.po/root/etc/e-smith/db/configuration/migrate/30lcSmbShare 1970-01-01 10:00:00.000000000 +1000
3 +++ e-smith-backup-2.2.0.new/root/etc/e-smith/db/configuration/migrate/30lcSmbShare 2010-01-30 18:54:56.000000000 +1100
4 @@ -0,0 +1,6 @@
5 +{
6 + my $SmbShare = $DB->get_prop('backupwk', 'SmbShare');
7 + return unless defined $SmbShare;
8 + $SmbShare = lc("$SmbShare");
9 + $DB->set_prop('backupwk', 'SmbShare', $SmbShare)
10 +}
11 diff -urN e-smith-backup-2.2.0.po/root/etc/e-smith/events/actions/workstation-backup-dar e-smith-backup-2.2.0.new/root/etc/e-smith/events/actions/workstation-backup-dar
12 --- e-smith-backup-2.2.0.po/root/etc/e-smith/events/actions/workstation-backup-dar 2010-01-30 03:05:13.000000000 +1100
13 +++ e-smith-backup-2.2.0.new/root/etc/e-smith/events/actions/workstation-backup-dar 2010-01-31 14:51:32.000000000 +1100
14 @@ -132,8 +132,35 @@
15 }
16 elsif ($VFSType eq 'usb')
17 {
18 - $err = qx(/bin/mount "/$smbshare" 2>&1);
19 - if ($err) {ldie("Error while mounting /$smbshare : \n" . $err)};
20 + my $device = "";
21 + my $blkdev = "";
22 + my $vollbl = "";
23 + foreach my $udi (qx(hal-find-by-property --key volume.fsusage --string filesystem)) {
24 + $udi =~ m/^(\S+)/;
25 + my $is_mounted = qx(hal-get-property --udi $1 --key volume.is_mounted);
26 +
27 + if ($is_mounted eq "false\n") {
28 + $blkdev = qx(hal-get-property --udi $1 --key block.device);
29 + $blkdev =~ m/^(\S+)/;
30 + }
31 + if ($is_mounted eq "false\n") {
32 + $vollbl = qx(hal-get-property --udi $1 --key volume.label);
33 + $vollbl =~ m/^(\S+)/;
34 + if ($vollbl =~ /^\s/) {$vollbl = 'nolabel';}
35 + }
36 +
37 + chomp $vollbl;
38 + chomp $blkdev;
39 + $vollbl = lc("media/$vollbl");
40 + if ($vollbl eq $smbshare) {
41 + $device = $blkdev;
42 + }
43 + }
44 +
45 + system("/bin/mkdir -p /$smbshare");
46 +
47 + $err = qx(/bin/mount $device "/$smbshare" 2>&1);
48 + if ($err) {ldie("Error while mounting $device /$smbshare : \n" . $err)};
49 $mntdir = "/$smbshare";
50 }
51 else
52 diff -urN e-smith-backup-2.2.0.po/root/etc/e-smith/web/functions/backup e-smith-backup-2.2.0.new/root/etc/e-smith/web/functions/backup
53 --- e-smith-backup-2.2.0.po/root/etc/e-smith/web/functions/backup 2010-01-30 03:05:13.000000000 +1100
54 +++ e-smith-backup-2.2.0.new/root/etc/e-smith/web/functions/backup 2010-01-31 15:05:32.000000000 +1100
55 @@ -349,16 +349,6 @@
56 )
57 ),"\n";
58
59 - #print esmith::cgi::genWidgetRow(
60 - # $q,
61 - # $fm->localise("SELECT_AN_ACTION"),
62 - # $q->popup_menu (
63 - # -name => 'function',
64 - # -values => [ @labels ],
65 - # -default => $default_action,
66 - # -labels => \%labels
67 - # )
68 - #);
69 }
70
71 print $q->end_table,"\n";
72 @@ -1226,14 +1216,15 @@
73 $q, undef, $fm->localise('CONFIGURE_WORKSTN_BACKUP'));
74
75 if ( $VFSType eq 'usb' ) {
76 - my @usbdisklist;
77 - @usbdisklist = qx'ls /media';
78 - for (@usbdisklist) {
79 - next if /floppy/;
80 - next if /cdrom/;
81 - push @usbdisks, $_;
82 - }
83 - unless (scalar @usbdisks) {
84 + foreach my $udi (qx(hal-find-by-property --key volume.fsusage --string filesystem)) {
85 + $udi =~ m/^(\S+)/;
86 + my $vollbl = qx(hal-get-property --udi $1 --key volume.label);
87 + $vollbl =~ m/^(\S+)/;
88 + if ($vollbl =~ /^\s/) {$vollbl = 'nolabel';}
89 + push @usbdisks, lc($vollbl);
90 + }
91 +
92 + unless ($usbdisks[0]){
93 esmith::cgi::genResult(
94 $fm->{cgi}, $fm->localise('ERR_NO_USB_DISK'));
95 return
96 @@ -3243,7 +3234,31 @@
97 elsif ($VFSType eq 'usb')
98 {
99 $_[2] = "/" . $share;
100 - return ( qx(/bin/mount "/$share" 2>&1) );
101 + my $device = "";
102 + my $blkdev = "";
103 + my $vollbl = "";
104 + foreach my $udi (qx(hal-find-by-property --key volume.fsusage --string filesystem)) {
105 + $udi =~ m/^(\S+)/;
106 + my $is_mounted = qx(hal-get-property --udi $1 --key volume.is_mounted);
107 +
108 + if ($is_mounted eq "false\n") {
109 + $blkdev = qx(hal-get-property --udi $1 --key block.device);
110 + if ($blkdev =~ m/^(\S+)/) {$blkdev = $1;}
111 + }
112 + if ($is_mounted eq "false\n") {
113 + $vollbl = qx(hal-get-property --udi $1 --key volume.label);
114 + $vollbl =~ m/^(\S+)/;
115 + if ($vollbl =~ /^\s/) {$vollbl = 'nolabel';}
116 + }
117 +
118 + chomp $vollbl;
119 + chomp $blkdev;
120 + $vollbl = lc("media/$vollbl");
121 + if ($vollbl eq $share) {
122 + $device = $blkdev;
123 + }
124 + }
125 + return ( qx(/bin/mount $device "/$share" 2>&1) );
126 }
127 else
128 {

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