]> gitweb.fluxo.info Git - backupninja.git/commitdiff
Allow 'when = XXX' in sh jobs.
authorintrigeri <intrigeri@boum.org>
Wed, 17 Aug 2011 10:00:16 +0000 (12:00 +0200)
committerintrigeri <intrigeri@boum.org>
Wed, 17 Aug 2011 10:15:37 +0000 (12:15 +0200)
when=XXX did work already. This patch allow to write this with spaces around the
equal sign - as in every other backup.d/ file.

AUTHORS
ChangeLog
examples/example.sh
handlers/sh.in

diff --git a/AUTHORS b/AUTHORS
index d50e69d90c00296a0a8008656cdb0cdfc90f2640..7d36c3393254264116f59478c581fcfd08da3c94 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -39,3 +39,4 @@ Jordi Mallach <jordi@debian.org> -- do not error when no jobs are configured
 Jacob Anawalt <jlanawalt@gmail.com> -- pg_dump format option
 Sergio Talens-Oliag <sto@debian.org> -- pipefail fixes
 Bruno Bigras <bigras.bruno@gmail.com> -- enable tar handler in the build system
+casper -- Allow 'when = XXX' with spaces in .sh files.
index f4a38f5be597d70204d6d462500968368c1ab05f..872f9747da54c98f31feff0955b8ee9c834873e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+version 0.9.10 -- UNRELEASED
+    handler changes:
+       sh:
+        . Allow 'when = XXX' with spaces (Redmine#2769).
+          Thanks to casper for the patch.
 version 0.9.9 -- May 15, 2011
     backupninja changes
         . Use locking to avoid running concurrent instances of the same backup
index f02f02670c4a3d55e16697b42db0fe50f2bec21d..75b01622ff85c68b21a59468d8514e87a2eddaee 100644 (file)
@@ -1,2 +1,4 @@
+# Note: the spaces around the equal sign ('=') are optional.
+when = saturdays at 05:30
 
 dpkg --get-selections > /var/backups/dpkg-selections.txt
index b070f3bce24f962e47a404a341f84efc18e1d87c..384ca528b23271bb38a6b26e5ae676cef2d436ed 100644 (file)
@@ -5,4 +5,11 @@
 # runs the file /etc/backup.d/scriptname.sh
 #
 
+# No-op function so that 'when = XXX' can be written as such in
+# backup.d/*.sh, i.e. with spaces around the equal sign - as in every
+# other backup.d/ file.
+function when() {
+   true
+}
+
 [ $test ] || ( . $1 )