[luci] Passing command line args to class luci.sys.call()

Frank Parker mr.frank.parker at gmail.com
Tue May 14 08:27:29 CEST 2013


Hello,
I am reading http://dev.luci.midlink.org/luci-doc/modules/luci.sys.html and
trying to use class luci.sys.call() to call a bash script and pass it two
arguments.

On a form button, I have:
function btn.write()
     luci.sys.call("/bin/register")
end

I would like to do this:
var1 = "joe"
var2 = "blue"
function btn.write()
     luci.sys.call("/bin/register $var1 $var2")
end

Obviously, this does not work.  I have tried many different variations but
I can't seem to pass any arguments in the luci.sys.call() function.

Is this possible?  Example?  Would it work with luci.sys.exec() instead?
 Is there a different function I should be using?

Thanks,
-parker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsignal.org/pipermail/luci/attachments/20130513/fc2215ac/attachment.html>


More information about the luci mailing list