From 19b08adf3520a221e77fe6ea4ebbeddd66966cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 30 Jan 2015 09:08:58 +0200 Subject: [PATCH 1/3] Fix lpostcmd to use isPostcmd via rawget as intended --- examples/lpostcmd.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lpostcmd.lua b/examples/lpostcmd.lua index b48b0da..11f7faf 100644 --- a/examples/lpostcmd.lua +++ b/examples/lpostcmd.lua @@ -25,7 +25,7 @@ local rsyncpostcmd = { -- uses rawget to test if "isPostcmd" has been set without -- triggering an error if not. local isPostcmd = rawget(event, "isPostcmd") - if event.isPostcmd then + if isPostcmd then spawn(event, "/usr/bin/ssh", config.host, config.postcmd) return From 5b76dc1cb6cacd5a086dc3870e39ab2d251ed5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 30 Jan 2015 09:12:02 +0200 Subject: [PATCH 2/3] Fix lpostcmd prepare to work with recent changes --- examples/lpostcmd.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/lpostcmd.lua b/examples/lpostcmd.lua index 11f7faf..8ad339e 100644 --- a/examples/lpostcmd.lua +++ b/examples/lpostcmd.lua @@ -62,7 +62,7 @@ local rsyncpostcmd = { -- called before anything else -- builds the target from host and targetdir - prepare = function(config) + prepare = function(config, level, skipTarget) if not config.host then error("rsyncpostcmd neets 'host' configured", 4) end @@ -72,7 +72,7 @@ local rsyncpostcmd = { if not config.target then config.target = config.host .. ":" .. config.targetdir end - return default.rsync.prepare(config) + return default.rsync.prepare(config, level, skipTarget) end } From abbf307b9720140a3dd71e96f8ea0328e1bd7115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 30 Jan 2015 09:25:53 +0200 Subject: [PATCH 3/3] Add checkgauge in lpostcmd --- examples/lpostcmd.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/lpostcmd.lua b/examples/lpostcmd.lua index 8ad339e..e413112 100644 --- a/examples/lpostcmd.lua +++ b/examples/lpostcmd.lua @@ -11,6 +11,14 @@ local rsyncpostcmd = { -- based on default rsync. default.rsync, + checkgauge = { + default.rsync.checkgauge, + host = true, + targetdir = true, + target = true, + postcmd = true, + }, + -- for this config it is important to keep maxProcesses at 1, so -- the postcmds will only be spawned after the rsync completed maxProcesses = 1,