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

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

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


Revision 1.2 - (show annotations) (download)
Sat Feb 8 22:53:55 2014 UTC (10 years, 8 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-backup-2_4_0-46_el6_sme, e-smith-backup-2_4_0-28_el6_sme, e-smith-backup-2_4_0-35_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-45_el6_sme, e-smith-backup-2_4_0-31_el6_sme, e-smith-backup-2_4_0-30_el6_sme, e-smith-backup-2_4_0-39_el6_sme, e-smith-backup-2_4_0-40_el6_sme, e-smith-backup-2_4_0-43_el6_sme, e-smith-backup-2_4_0-32_el6_sme, e-smith-backup-2_4_0-42_el6_sme, e-smith-backup-2_4_0-34_el6_sme, e-smith-backup-2_4_0-36_el6_sme, e-smith-backup-2_4_0-33_el6_sme, e-smith-backup-2_4_0-26_el6_sme, e-smith-backup-2_4_0-38_el6_sme, e-smith-backup-2_4_0-29_el6_sme, e-smith-backup-2_4_0-27_el6_sme, e-smith-backup-2_4_0-41_el6_sme, HEAD
Changes since 1.1: +15 -5 lines
* Sat Feb 8 2014 Ian Wells <esmith@wellsi.com> 2.4.0-26.sme
- Workstation Backup, Mail and WOL now subroutines [SME: 8193]
- Workstation Backup, remove the need for a temporary directory, updated. [SME: 7767]

1 diff -ruN e-smith-backup-2.4.0.p22/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.p22/root/etc/e-smith/events/actions/workstation-backup-dar 2014-02-05 16:38:55.000000000 -0800
3 +++ e-smith-backup-2.4.0/root/etc/e-smith/events/actions/workstation-backup-dar 2014-02-05 16:40:07.000000000 -0800
4 @@ -85,7 +85,7 @@
5 my $tomail = $backupwk->prop('ToMail') || 'admin';
6 my $deleteearly = $backupwk->prop('DeleteEarly') || 'false';
7 my $ether = $internalinterface->prop('Name');
8 -my $tmpdir;
9 +
10
11 $report .= "From: ".$frommail."\n";
12 $report .= "To: $tomail\n";
13 @@ -147,14 +147,6 @@
14 my $setdirname = $mntdir . "/$id/" . $setname;
15 &createTree ($setdirname);
16
17 -if ($deleteearly ne 'true')
18 -{
19 - $tmpdir = $mntdir . '/tmp_dir';
20 -
21 - &removeTree ("$tmpdir/$id");
22 - &createTree ("$tmpdir/$id");
23 - $report .= "Working directory //$smbhost/$smbshare/tmp_dir/$id\n";
24 -}
25 $report .= "Destination //$smbhost/$smbshare/$id/$setname\n";
26
27 if ( $incnum == 0 )
28 @@ -222,7 +214,7 @@
29 &createTree ($setdirname);
30 }
31
32 -my $destination = ($deleteearly ne 'true') ? "$tmpdir/$id/$bkname" : "$setdirname/$bkname";
33 +my $destination = ($deleteearly ne 'true') ? "$mntdir/$id/$bkname" : "$setdirname/$bkname";
34
35 # Perform the actual backup
36 my $rc = run_backup($destination);
37 @@ -234,17 +226,16 @@
38
39 if ($deleteearly ne 'true') # Not DeleteEarly so move backup to $setdirname
40 {
41 - if ($incnum == 0)
42 + if ($incnum == 0) # Create new set directory
43 {
44 &removeTree ($setdirname);
45 &createTree ($setdirname);
46 }
47 - foreach (bsd_glob("$tmpdir/$id/$bkname*"))
48 + foreach (bsd_glob("$mntdir/$id/*.dar")) # Move the backup files to the set directory
49 {
50 - ldie("Error while moving backup file $_ from temporary dir $tmpdir/$id to $setdirname : $!")
51 + ldie("Error while moving backup file $_ to $setdirname : $!")
52 unless move($_, $setdirname);
53 }
54 - &removeTree ("$tmpdir/$id");
55 }
56
57 # update dar_manager catalog

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