Code Monkey home page Code Monkey logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
I could not reproduce this error. Please provide more info like your exact 
configuration script, the debug/error log and what `ls -al /bin/sh' yields. I 
changed the example tough so it should now be compatible with 'dash' which is 
the default shell on my system.

Original comment by [email protected] on 30 Sep 2011 at 12:23

  • Changed state: WorksForMe

from lsyncd.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
configuration file:
settings = {
        nodaemon = true,
}

bash = {
        delay = 0,
        maxProcesses = 3,
        onCreate = "echo creat ^sourcePathname ^targetPathname",
        onModify = "echo mod ^sourcePathname ^targetPathname",
        onDelete = "echo del ^targetPathname",
        onMove   = "echo move ^o.targetPathname ^d.targetPathname",
--        onStartup = [[if [ "$(ls -A ^source)" ]; then cp -r ^source* ^target; 
fi]],
}

sync{bash, source="/home/lonewolf/teste1", targetDir="/home/lonewolf/teste2"}

ls -al /bin/sh
lrwxrwxrwx 1 root root 4 Jan 25  2011 /bin/sh -> bash


a simple touch /home/lonewolf/teste1/test triggers the error

debug log:
kernels clocks_per_sec=100
Call: configure()
Inotify: inotify fd = 3
Call: initialize()
13:28:22 FWrite: translated [[echo creat ^sourcePathname ^target]] to
function(event)
    log("Normal", "Event " .. event.etype ..
        [[ spawns shell 'echo creat ]]..event.sourcePathname..[[ ]]..event.target..[[']])
    spawnShell(event, [[echo creat "$1" "$2"]],
         event.sourcePathname,
         event.target)
end
13:28:22 Function: Inotify.addWatch(/home/lonewolf/teste1/, (true), (nil), 
(nil))
13:28:22 Inotify: addwatch(/home/lonewolf/teste1/)->1
13:28:22 Call: getAlarm()
13:28:22 Alarm: runner.getAlarm returns: (true)
13:28:22 Masterloop: immediately handling delays.
13:28:22 Call: cycle()
13:28:22 Function: invokeActions('Sync1',(Timestamp: 4634745.99))
13:28:22 Call: getAlarm()
13:28:22 Alarm: runner.getAlarm returns: (false)
13:28:22 Masterloop: going into select (no timeout).
13:28:47 Call: inotifyEvent()
13:28:47 Inotify: got event Create test(1)
13:28:47 Function: delay(Sync1, Create, /test, (nil))
13:28:47 Delay: New Create:/test
13:28:47 Call: inotifyEvent()
13:28:47 Inotify: got event Attrib test(1)
13:28:47 Function: delay(Sync1, Attrib, /test, (nil))
13:28:47 Delay: Attrib:/test absorbed by Create:/test
13:28:47 Call: inotifyEvent()
13:28:47 Inotify: got event Modify test(1)
13:28:47 Function: delay(Sync1, Modify, /test, (nil))
13:28:47 Delay: Modify:/test absorbed by Create:/test
13:28:47 Call: cycle()
13:28:47 Function: invokeActions('Sync1',(Timestamp: 4634770.63))
13:28:47 Error: IN LUA: [string "return function(event)..."]:3: attempt to 
concatenate field 'target' (a nil value)
13:28:47 Error: Backtrace 1 :[string "return function(event)..."]:3
13:28:47 Error: Backtrace 2 :/usr/lib64/lsyncd/lsyncd.lua:3715
13:28:47 Error: Backtrace 3 :/usr/lib64/lsyncd/lsyncd.lua:1473
13:28:47 Error: Backtrace 4 :/usr/lib64/lsyncd/lsyncd.lua:2597

Original comment by [email protected] on 30 Sep 2011 at 12:29

from lsyncd.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
The call should be 

sync{bash, source="/home/lonewolf/teste1", target="/home/lonewolf/teste2"}

not targetDir.

Sorry it doesn't complain more early

BTW direct operation is now built into Lsyncd already as 'default.direct'.

Original comment by [email protected] on 30 Sep 2011 at 1:01

  • Changed state: New

from lsyncd.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
Its working now, in my opinion you should put a complete example for each 
layer, it would make it easier for who is starting to use it.

Original comment by [email protected] on 30 Sep 2011 at 1:31

from lsyncd.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
will do.

Original comment by [email protected] on 30 Sep 2011 at 1:51

from lsyncd.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
Your issue has been moved to https://github.com/axkibe/lsyncd/issues

Original comment by [email protected] on 16 Nov 2011 at 3:58

from lsyncd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.