rotation.schedule bug

Gunnar Wrobel <[email protected]> Wed, 04 Jan 2006 10:32:51 +0100
Newsgroups gmane.comp.sysutils.backup.sarab
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------060502050007060605050802
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hello!

I have been using sarab-0.2.2 for a while on Gentoo now. Since I am
using several archives I also created several rotation schedules. But
there is a bug in the rotation function that makes this impossible. I
attached a fix for it.

Is there any chance that there will be a release of a 0.2.3 version?
Since sarab is included in several distributions it would be nice if the
accumulated patches would be made available as an official version.

Cheers

Gunnar

--------------060502050007060605050802
Content-Type: text/plain;
 name="rotation-schedule.fix"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="rotation-schedule.fix"

diff -Naur sarab.orig/sarab.sh sarab/sarab.sh
--- sarab.orig/sarab.sh	2006-01-04 09:45:36.000000000 +0100
+++ sarab/sarab.sh	2006-01-04 09:49:43.000000000 +0100
@@ -34,7 +34,7 @@
 function rotate 
 {
     lines=$(cat $SARAB_ETC/$ROTATION_SCHEDULE | wc -l)
-    firstline="$(head -n 1 $SARAB_ETC/rotation.schedule)"
+    firstline="$(head -n 1 $SARAB_ETC/$ROTATION_SCHEDULE)"
 
     # Copy all but the first line back into rotation schedule
     tail -n $(expr $lines - 1) $SARAB_ETC/$ROTATION_SCHEDULE > $SARAB_ETC/rotation.schedule.temp

--------------060502050007060605050802--



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click