summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Noll <maan@systemlinux.org>2009-04-07 14:18:14 +0200
committerAndre Noll <maan@systemlinux.org>2009-04-07 14:18:14 +0200
commitcd4dc100fa8507f254e935e0747161d6a201b73c (patch)
tree64bdb98c9e0c918e43c5c08e2c7d436d0558d405
parent56cb4048819e7c6ed00cd5723b823f3bb92c1d61 (diff)
parent2c323390175ba8d8d8b9f8dcd5201abb6039aad6 (diff)
Merge branch 'master' into rm_hook
-rw-r--r--dss.c12
-rw-r--r--dss.ggo10
2 files changed, 17 insertions, 5 deletions
diff --git a/dss.c b/dss.c
index 2660348..2a0fb9e 100644
--- a/dss.c
+++ b/dss.c
@@ -369,7 +369,7 @@ static int pre_create_hook(void)
snapshot_creation_status = SCS_PRE_HOOK_SUCCESS;
return 0;
}
- DSS_NOTICE_LOG("executing %s\n", conf.pre_create_hook_arg);
+ DSS_DEBUG_LOG("executing %s\n", conf.pre_create_hook_arg);
ret = dss_exec_cmdline_pid(&create_pid,
conf.pre_create_hook_arg, fds);
if (ret < 0)
@@ -534,6 +534,7 @@ out:
static int handle_pre_create_hook_exit(int status)
{
int es, ret;
+ static int warn_count;
if (!WIFEXITED(status)) {
snapshot_creation_status = SCS_READY;
@@ -543,11 +544,18 @@ static int handle_pre_create_hook_exit(int status)
}
es = WEXITSTATUS(status);
if (es) {
+ if (!warn_count--) {
+ DSS_NOTICE_LOG("pre_create_hook %s returned %d\n",
+ conf.pre_create_hook_arg, es);
+ DSS_NOTICE_LOG("deferring snapshot creation...\n");
+ warn_count = 60; /* warn only once per hour */
+ }
snapshot_creation_status = SCS_READY;
compute_next_snapshot_time();
- ret = -E_BAD_EXIT_CODE;
+ ret = 0;
goto out;
}
+ warn_count = 0;
snapshot_creation_status = SCS_PRE_HOOK_SUCCESS;
ret = 1;
out:
diff --git a/dss.ggo b/dss.ggo
index bca3fff..099df4c 100644
--- a/dss.ggo
+++ b/dss.ggo
@@ -3,7 +3,7 @@
# Licensed under the GPL v2. For licencing details see COPYING.
package "dss"
-version "0.1.1"
+version "0.1.2"
purpose "the dyadic snapshot scheduler
dss creates hardlink-based snapshots of a given directory on a remote
@@ -195,8 +195,12 @@ string typestr="option"
optional
multiple
details="
- These option may be given multiple times. The arguments passed
- to that option are passed verbatim to the rsync command.
+ This option may be given multiple times. The given argument is
+ passed verbatim to the rsync command. Note that in order to use
+ rsync options that require an argument, you have to specify the
+ option and its argument as separate --rsync-options, like this:
+
+ --rsync-option --exclude --rsync-option /proc
"
###################