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

edwin chen edwin.voip at gmail.com
Tue May 14 08:58:59 CEST 2013


try

luci.sys.call("/bin/register "..var1.." "..var2)
 在 2013-5-14 PM2:34,"Frank Parker" <mr.frank.parker at gmail.com>写道:

> Hello,
> I am reading http://dev.luci.midlink.org/luci-doc/modules/luci.sys.htmland 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
>
>
> _______________________________________________
> luci mailing list
> luci at lists.subsignal.org
> https://lists.subsignal.org/mailman/listinfo/luci
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsignal.org/pipermail/luci/attachments/20130514/3d5083de/attachment.html>


More information about the luci mailing list