[safekeep/f15/master] Patch safekeep.cron to not run unless safekeep has been configured
Frank Crawford
frankcrawford at fedoraproject.org
Sun May 8 05:09:35 UTC 2011
commit 304814ed6a49cec2b209ac5433d7ea978d1191a3
Author: Frank Crawford <frank at crawford.emu.id.au>
Date: Sun May 8 15:09:10 2011 +1000
Patch safekeep.cron to not run unless safekeep has been configured
safekeep-cron.patch | 10 ++++++++++
safekeep.spec | 9 ++++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/safekeep-cron.patch b/safekeep-cron.patch
new file mode 100644
index 0000000..d274ff7
--- /dev/null
+++ b/safekeep-cron.patch
@@ -0,0 +1,10 @@
+--- safekeep/safekeep.cron.orig 2011-05-08 14:28:07.000000000 +1000
++++ safekeep/safekeep.cron 2011-05-08 14:28:58.000000000 +1000
+@@ -1,5 +1,7 @@
+ #!/bin/sh
+
++[ -z "`ls -1 /etc/safekeep/backup.d/*.backup 2> /dev/null`" ] && exit 0
++
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+ safekeep -v --server
diff --git a/safekeep.spec b/safekeep.spec
index 1da50a8..269480f 100644
--- a/safekeep.spec
+++ b/safekeep.spec
@@ -1,6 +1,6 @@
%define name safekeep
%define version 1.3.2
-%define release 1
+%define release 2
%define homedir %{_localstatedir}/lib/%{name}
Name: %{name}
@@ -14,6 +14,8 @@ URL: http://safekeep.sourceforge.net
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# Now included in distributed documentation
#Source1: README.Fedora
+# Don't execute unless backup configurations exist
+Patch0: safekeep-cron.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -68,6 +70,8 @@ installed on the server on which the data will be backed-up to.
%prep
%setup -q
+%patch0 -p1
+rm -f *.orig
%build
make build
@@ -119,6 +123,9 @@ id %{name} >/dev/null 2>&1 || \
%doc samples/
%changelog
+* Sat May 08 2011 Frank Crawford <frank at crawford.emu.id.au> 1.3.2-2
+ - Patch safekeep.cron to not run unless safekeep has been configured
+
* Sat Mar 12 2011 Frank Crawford <frank at crawford.emu.id.au> 1.3.2-1
- Latest upstream release
More information about the scm-commits
mailing list