LuCId fixes
authorSteven Barth <steven@midlink.org>
Wed, 27 May 2009 13:20:35 +0000 (13:20 +0000)
committerSteven Barth <steven@midlink.org>
Wed, 27 May 2009 13:20:35 +0000 (13:20 +0000)
libs/lucid/luasrc/lucid.lua
libs/lucid/root/etc/config/lucid
libs/lucid/root/etc/init.d/lucid

index d72bf25ef9c6007f94c8067fe6adee506a2e6045..34452a5991b4aea311d269f2f56032028b6e4a00 100644 (file)
@@ -176,7 +176,7 @@ end
 
 function create_process(threadcb, waitcb)
        local threadlimit = tonumber(cursor:get(UCINAME, "main", "threadlimit"))
-       if threadlimit and #tpids >= tcount then
+       if threadlimit and tcount >= threadlimit then
                nixio.syslog("warning", "Unable to create thread: process limit reached")
                return nil
        end
index bfbb4ca1dde772e9395b7fedd4ac1e783d6a8b1c..7baf6db3ef7dc5fb38d308c182efaa4dff14e85f 100644 (file)
@@ -1,7 +1,7 @@
 config lucid main
        option pollinterval 15000
        option threadlimit 25
-       option daemon 1
+       option daemonize 1
        option debug 0
        list supports tcpserver
        list supports server
index 125dc7bf5d311a7936631fb2420272bbf8587336..1b2b04ed4e1a04a8526058b07adc3b8de4bf8278 100755 (executable)
@@ -9,13 +9,13 @@ set -e
 
 start() {
        echo -n "Starting $DESC: $NAME"
-       lua -e 'require "luci.lucid".start()'
+       lua -lluci.lucid -e 'luci.lucid.start()'
        echo "."
 }
 
 stop() {
        echo -n "Stopping $DESC: $NAME"
-       lua -e 'require "luci.lucid".stop()'
+       lua -lluci.lucid -e 'luci.lucid.stop()'
        echo "."
 }