trying to fix, not working yet

This commit is contained in:
Axel Kittenberger 2011-02-08 16:38:55 +00:00
parent cbfed8ee99
commit 9096fc9686
3 changed files with 16 additions and 3 deletions

View File

@ -20,11 +20,13 @@ dist_example_DATA = \
examples/lecho.lua \ examples/lecho.lua \
examples/lgforce.lua \ examples/lgforce.lua \
examples/limagemagic.lua \ examples/limagemagic.lua \
examples/lpostcmd.lua \
examples/lrsync.lua \ examples/lrsync.lua \
examples/lrsyncssh.lua examples/lrsyncssh.lua
TESTS = \ TESTS = \
tests/churn-rsync.lua \ tests/churn-rsync.lua \
tests/churn-rsyncssh.lua \ tests/churn-rsyncssh.lua \
tests/churn-direct.lua \
tests/exclude-rsync.lua \ tests/exclude-rsync.lua \
tests/exclude-rsyncssh.lua \ tests/exclude-rsyncssh.lua \
tests/l4rsyncdata.lua tests/l4rsyncdata.lua

View File

@ -3431,8 +3431,14 @@ local default_direct = {
-- gets all events ready for syncing -- gets all events ready for syncing
local event, event2 = inlet.getEvent() local event, event2 = inlet.getEvent()
if event.etype == "Create" or event.etpye == "Modifiy" then if event.etype == "Create" or event.etype == "Modifiy" then
spawn(event, "/bin/cp", "-r", event.sourcePath, event.targetPathdir) spawn(event,
"/bin/cp",
"-p",
event.sourcePath,
"-t",
event.targetPathdir
)
elseif event.etype == "Delete" then elseif event.etype == "Delete" then
local tp = event.targetPath local tp = event.targetPath
-- extra security check -- extra security check
@ -3493,6 +3499,11 @@ local default_direct = {
-- Default delay is very short. -- Default delay is very short.
-- --
delay = 1, delay = 1,
-----
-- For startup sync
--
rsyncOps = "-lts",
----- -----
-- On many system multiple disk operations just rather slow down -- On many system multiple disk operations just rather slow down

View File

@ -15,7 +15,7 @@ churn(srcdir, 10)
local logs = {} local logs = {}
--logs = {"-log", "Delay", "-log", "Fsevents" } --logs = {"-log", "Delay", "-log", "Fsevents" }
local pid = spawn("./lsyncd", "-nodaemon", "-delay", "5", local pid = spawn("./lsyncd", "-nodaemon",
"-direct", srcdir, trgdir, unpack(logs)) "-direct", srcdir, trgdir, unpack(logs))
cwriteln("waiting for Lsyncd to startup") cwriteln("waiting for Lsyncd to startup")