pre_remove_hook: Really pass full path of the snapshot.
authorAndre Noll <maan@systemlinux.org>
Mon, 5 Apr 2010 18:35:47 +0000 (20:35 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 5 Apr 2010 18:35:47 +0000 (20:35 +0200)
We computed and logged the correct command, but executed the
wrong one.

dss.c

diff --git a/dss.c b/dss.c
index 68efc2b..53707bd 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -250,8 +250,7 @@ static int pre_remove_hook(struct snapshot *s, const char *why)
        cmd = make_message("%s %s/%s", conf.pre_remove_hook_arg,
                conf.dest_dir_arg, s->name);
        DSS_DEBUG_LOG("executing %s\n", cmd);
-       ret = dss_exec_cmdline_pid(&remove_pid,
-               conf.pre_remove_hook_arg, fds);
+       ret = dss_exec_cmdline_pid(&remove_pid, cmd, fds);
        free(cmd);
        if (ret < 0)
                return ret;