/[smeserver]/rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-workstation-removeSet0.patch
ViewVC logotype

Contents of /rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-workstation-removeSet0.patch

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


Revision 1.2 - (show annotations) (download)
Sat Jan 4 03:02:08 2014 UTC (10 years, 5 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-backup-2_2_0-79_el5_sme, e-smith-backup-2_2_0-85_el5_sme, e-smith-backup-2_2_0-81_el5_sme, e-smith-backup-2_2_0-80_el5_sme, e-smith-backup-2_2_0-86_el5_sme, e-smith-backup-2_2_0-83_el5_sme, e-smith-backup-2_2_0-82_el5_sme, e-smith-backup-2_2_0-88_el5_sme, e-smith-backup-2_2_0-84_el5_sme, e-smith-backup-2_2_0-87_el5_sme, HEAD
Changes since 1.1: +17 -6 lines
* Fri Jan 3 2014 Ian Wells <esmith@wellsi.com> 2.2.0-79.sme
- Workstation Backup, count backup sets from 1 and
  delete the obsolete set0 when it goes out of scope [SME: 7811]

1 diff -ruN e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar
2 --- e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2014-01-03 17:13:10.000000000 -0800
3 +++ e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar 2014-01-03 17:19:51.000000000 -0800
4 @@ -213,7 +213,21 @@
5 if ($incnum == 0)
6 {
7 $setnum %= $setsmax;
8 - ++$setnum;
9 + $setnum++;
10 +
11 + # Remove set0 if reached $setsmax as set0 is deprecated and no longer valid.
12 + if ($setnum == $setsmax && -d "$mntdir/$id/set0")
13 + {
14 + # if $setsmax already exists, just delete set0
15 + if (-d "$mntdir/$id/set$setsmax")
16 + {
17 + &remove_tree ("$mntdir/$id/set0");
18 + }
19 + else # move set0 to $setsmax, it will be deleted after a successful backup
20 + {
21 + move("$mntdir/$id/set0", "$mntdir/$id/set$setsmax");
22 + }
23 + }
24 }
25
26 $report .= sprintf("Using set number %d of %d\n", $setnum, $setsmax);

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