/[smeserver]/rpms/e-smith-backup/sme9/e-smith-backup-2.4.0-workstation-correctmount.patch
ViewVC logotype

Contents of /rpms/e-smith-backup/sme9/e-smith-backup-2.4.0-workstation-correctmount.patch

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


Revision 1.1 - (show annotations) (download)
Sun Apr 27 05:08:31 2014 UTC (10 years ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-backup-2_4_0-42_el6_sme, e-smith-backup-2_4_0-38_el6_sme, e-smith-backup-2_4_0-46_el6_sme, e-smith-backup-2_4_0-44_el6_sme, e-smith-backup-2_4_0-37_el6_sme, e-smith-backup-2_4_0-41_el6_sme, e-smith-backup-2_4_0-39_el6_sme, e-smith-backup-2_4_0-45_el6_sme, e-smith-backup-2_4_0-40_el6_sme, e-smith-backup-2_4_0-43_el6_sme, HEAD
* Sat Apr 26 2014 Ian Wells <esmith@wellsi.com> 2.4.0-37.sme
- Workstation Backup, fix regression in mounting backup share [SME: 8144]

1 diff -ruN e-smith-backup-2.4.0.p37/root/etc/e-smith/events/actions/workstation-backup-dar e-smith-backup-2.4.0/root/etc/e-smith/events/actions/workstation-backup-dar
2 --- e-smith-backup-2.4.0.p37/root/etc/e-smith/events/actions/workstation-backup-dar 2014-04-26 20:19:08.000000000 -0700
3 +++ e-smith-backup-2.4.0/root/etc/e-smith/events/actions/workstation-backup-dar 2014-04-26 20:22:48.000000000 -0700
4 @@ -330,7 +330,6 @@
5 }
6 elsif ($VFSType eq 'usb')
7 {
8 - $_[2] = "/" . $share;
9 my $device = "";
10 my $blkdev = "";
11 my $vollbl = "";
12 diff -ruN e-smith-backup-2.4.0.p37/root/etc/e-smith/web/functions/backup e-smith-backup-2.4.0/root/etc/e-smith/web/functions/backup
13 --- e-smith-backup-2.4.0.p37/root/etc/e-smith/web/functions/backup 2014-04-26 20:19:08.000000000 -0700
14 +++ e-smith-backup-2.4.0/root/etc/e-smith/web/functions/backup 2014-04-26 21:35:24.000000000 -0700
15 @@ -32,6 +32,7 @@
16 use esmith::util;
17 use esmith::lockfile;
18 use File::Find;
19 +use File::Path qw(make_path remove_tree);
20
21 $File::Find::dont_use_nlink = 1; # fix for Windows shares
22
23 @@ -1759,6 +1760,7 @@
24 my $smbshare = $rec->prop('SmbShare');
25 my $VFSType = $rec->prop('VFSType') || 'cifs';
26 my $err;
27 + $mntdir = "/$smbshare" if ( $VFSType eq 'usb' );
28
29 my $setbackuplist = sub {
30 if ( $_ =~ /\.dar/ ) {
31 @@ -1892,6 +1894,7 @@
32 my $err;
33 my $VFSType = $backupwkrec->prop('VFSType') || 'cifs';
34 my $verifyref = $q->param ('backupset');
35 + $mntdir = "/$smbshare" if ( $VFSType eq 'usb' );
36
37 # Mounting backup shared folder
38 $error_message = bmount($mntdir,$smbhost,$smbshare,$VFSType);
39 @@ -2124,6 +2127,7 @@
40 my $smbhost = $rec->prop('SmbHost');
41 my $smbshare = $rec->prop('SmbShare');
42 my $err;
43 + $mntdir = "/$smbshare" if ( $VFSType eq 'usb' );
44
45 my $setbackupflist = sub {
46 if ( $_ =~ /\.dar/ )
47 @@ -2271,6 +2275,7 @@
48 my $VFSType = $backupwkrec->prop('VFSType') || 'cifs';
49 my $smbhost = $backupwkrec->prop('SmbHost');
50 my $smbshare = $backupwkrec->prop('SmbShare');
51 + $mntdir = "/$smbshare" if ( $VFSType eq 'usb' );
52 my $err;
53 my $error_message;
54
55 @@ -2500,6 +2505,7 @@
56 my $VFSType = $rec->prop('VFSType') || 'cifs';
57 my $smbhost = $rec->prop('SmbHost');
58 my $smbshare = $rec->prop('SmbShare');
59 + $mntdir = "/$smbshare" if ( $VFSType eq 'usb' );
60 my $err;
61 my $error_message;
62
63 @@ -2656,6 +2662,7 @@
64 my $VFSType = $backupwkrec->prop('VFSType') || 'cifs';
65 my $err;
66 my $error_message;
67 + $mntdir = "/$smbshare" if ( $VFSType eq 'usb' );
68
69 my $backupkey = $q->param ('backupset');
70 if ($backupkey =~ /^(.*)$/)
71 @@ -2819,6 +2826,7 @@
72 my $smbshare = $backupwkrec->prop('SmbShare');
73 my $err;
74 my $error_message;
75 + $mntdir = "/$smbshare" if ( $VFSType eq 'usb' );
76
77 # Mounting backup shared folder
78 $error_message = bmount($mntdir,$smbhost,$smbshare,$VFSType);
79 @@ -3079,7 +3087,6 @@
80 }
81 elsif ($VFSType eq 'usb')
82 {
83 - $_[2] = "/" . $share;
84 my $device = "";
85 my $blkdev = "";
86 my $vollbl = "";
87 @@ -3138,10 +3145,11 @@
88 }
89
90 # create the directory mount point if it does not exist
91 - createTree ($mntdir);
92 -
93 + my $err = createTree ($mntdir);
94 + return ($fm->localise('ERR_MOUNTING_SMBSHARE') . "<//$host/$share>\n" . $err) if $err;
95 +
96 # mount the backup directory
97 - my $err = dmount($host,$share,$mntdir,'','',$VFSType);
98 + $err = dmount($host,$share,$mntdir,'','',$VFSType);
99 return ($fm->localise('ERR_MOUNTING_SMBSHARE') . "<//$host/$share>\n" . $err) if $err;
100
101 # verify $mntdir is mounted
102 @@ -3187,6 +3195,17 @@
103 return @mntout;
104 }
105
106 +sub createTree
107 +{
108 + my $tree = shift;
109 + if (! -d "$tree")
110 + {
111 + eval {make_path("$tree")};
112 + return ("Error while creating $tree : $@. Maybe insufficient rights directory.\n") if $@;
113 + }
114 + return;
115 +}
116 +
117 __DATA__
118 <form>
119 </form>

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