From 317f1cbdb55a36593145ccc7b1246042fb6e52f4 Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Tue, 7 Aug 2007 19:19:54 +0000
Subject: [PATCH] Improve the --start-time option.

* backup-repeatedly: Exit immediately if the finish or stop file
  exists, and not after the long wait implied by --start-time.
---
 ChangeLog         | 4 ++++
 backup-repeatedly | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 95b6326..c189c90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-08-07  Per Cederqvist  <ceder@ryttargardskyrkan.se>
 
+	Improve the --start-time option.
+	* backup-repeatedly: Exit immediately if the finish or stop file
+	exists, and not after the long wait implied by --start-time.
+	
 	Added support for starting the backups at a predefined time.
 	* backup-repeatedly: New option: --start-time, that specifies the
 	hour and minute when the backup should start.
diff --git a/backup-repeatedly b/backup-repeatedly
index 0d6d7af..e01e84f 100755
--- a/backup-repeatedly
+++ b/backup-repeatedly
@@ -23,6 +23,9 @@ esac
 	    
 while :
 do
+  [ -f /opt/LYSrdiff/etc/finish ] && break
+  [ -f /opt/LYSrdiff/etc/stop ] && break
+
   if [ -n "$starttime" ]
   then
       if [ -z "`find $LASTSTART -ctime +0 -print 2>/dev/null`" ]
@@ -49,8 +52,6 @@ do
   fi
 
   ctr=`expr $ctr + 1`
-  [ -f /opt/LYSrdiff/etc/finish ] && break
-  [ -f /opt/LYSrdiff/etc/stop ] && break
 
   echo
   echo Running all jobs.  Repeat count: $ctr.
-- 
GitLab