--- rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-workstation-removeSet0.patch 2013/12/12 06:50:27 1.1 +++ rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-workstation-removeSet0.patch 2014/01/04 03:02:08 1.2 @@ -1,14 +1,25 @@ 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 ---- e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2013-12-11 22:22:38.000000000 -0800 -+++ e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar 2013-12-11 22:30:12.000000000 -0800 -@@ -214,6 +214,11 @@ +--- e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2014-01-03 17:13:10.000000000 -0800 ++++ e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar 2014-01-03 17:19:51.000000000 -0800 +@@ -213,7 +213,21 @@ + if ($incnum == 0) { $setnum %= $setsmax; - ++$setnum; +- ++$setnum; ++ $setnum++; ++ + # Remove set0 if reached $setsmax as set0 is deprecated and no longer valid. -+ if ($setnum == $setsmax) ++ if ($setnum == $setsmax && -d "$mntdir/$id/set0") + { -+ &remove_tree ("$mntdir/$id/set0"); ++ # if $setsmax already exists, just delete set0 ++ if (-d "$mntdir/$id/set$setsmax") ++ { ++ &remove_tree ("$mntdir/$id/set0"); ++ } ++ else # move set0 to $setsmax, it will be deleted after a successful backup ++ { ++ move("$mntdir/$id/set0", "$mntdir/$id/set$setsmax"); ++ } + } }