[luci] Informations from Luci to Shell

Steven Barth steven at midlink.org
Wed Apr 21 18:02:45 CEST 2010


You have to load the module using the -l parameter of Lua, e.g.:
-lluci.sys

Am Mittwoch 21 April 2010 17:43:08 schrieb Clemens John:
> On Wednesday 21 April 2010 17:02:14 Steven Barth wrote:
> > Hi Clemens,
> > 
> > nearly all of that information is generated by the Lua modules luci.sys
> > and its submodules.
> > You can find its documentation here:
> > http://dev.luci.cyranjo.org/luci-doc/modules/luci.sys.html
> 
> That looks interesting.
> 
> But when I try to execute a command to get information from luci i´m
> geting: -------
> root at OpenWrt:~# lua -e 'print(luci.sys.sysinfo())'
> lua: (command line):1: attempt to index global 'luci' (a nil value)
> stack traceback:
>         (command line):1: in main chunk
>         [C]: ?
> 
> 
> Executing a command I found in an example works:
> ------
> root at OpenWrt:~# lua -e 'print(os.date())'
> Wed Apr 21 15:41:51 2010
> 
> What am I doing wrong?
> 
> Thanks
> Clemens



More information about the luci mailing list