If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.
Property:luavar
BoxMatrix >> Shell-Commands >> luavar | @ BoxMatrix - IRC-Chat - Translate: de es fr it nl pl |
News | Selectors | Models | Accessories | Components | Environment | Config | Commands | System | Webif | Software | Develop | Lexicon | Community | Project | Media |
Startup-Scr | Hotplug-Scr | BusyBox-Cmds | Bash-Cmds | AVM-Cmds | Chipset-Cmds | Linux-Cmds | Shared-Libs | Kernel-Mods | Research |
AVM-Command
Command: | luavar - type Exec | Wiki | Freetz | IPPF | whmf | AVM | Web |
Location: | Shell-Commands >> AVM-Commands - Origin: AVM | ||||||
Path: | Release: /bin Lab+Rel: /bin | ||||||
Properties: | Size: 7.3k - 14.2k - Firmware: 5.23 - 8.00 | ||||||
Function: | Lua commandline interpreter. |
Goto: Limits - Examples - Source - Dependencies - Model-Matrix - Symbols - SMW-Browser
Details
luavar is a minimalistic Lua commandline interpreter. Lua is a simple and efficient scripting language.
Unlike Perl or PHP its memory and storage footprint makes it an excellent choice for embedded usage like in FRITZ!OS.
Initially AVM only provided the luacgi interpreter, which requires webserver login, but later they added luavar for shell usage.
Lua scripts can be textual or compiled bytecode, both use the .lua file extension.
AVM uses this fact to hide the source of the mobiled Lua plugins, see the Plugins section there.
luavar does not provide help functionality. It only accepts one argument:
usage: luavar [<lua-script>]
Let's do the obligatory Hello world test:
$ echo "print('Hello world!')" > test.lua $ luavar test.lua Hello world!
Like every script language luavar can also be run from the shebang line:
#! /bin/luavar print('Hello world!')
Save this file as 'test'. make it executable with 'chmod +x test'. and run it './test'.
Limits
The limits of luavar have yet to be collected.
One important fact is that luavar does no provide any error messages.
$ echo "print('Hello " > test.lua $ luavar test.lua
If a script is broken it fails silenty. Not a development tool.
Examples
PeterPawn did some examples for luavar usage, the code can be downloaded here. The most interesting is queries.lua which provides an efficient and fast way to mass query UI-Modules without using ctlmgr_ctl.
Source
The names of source files compiled into an executable often help to understand function blocks (and show gaps in the docs).
fw 7.39 source files:
$ strings /bin/luavar | grep -e '\.c$' -e '\.cpp$' ar7/ctlmgr/src/luacgi/luavar.c
Dependencies
Daily updated index of all dependencies of this command. Last update: 2024-12-21 07:44 GMT.
A *
in the Mod
column marks info from Supportdata-Probes, which will always stay incomplete.
Relation | Typ | Object | Mod | Firmware | Info | Origin |
---|---|---|---|---|---|---|
Depends on | lib | ld.so | 33 | 7.08 - 8.00 | Dynamic linker / loader | Linux |
Depends on | lib | libar7cfg.so | 52 | 6.54 - 7.81 | TFFS-Configuration API to ar7.cfg and many more. | AVM |
Depends on | lib | libavmauth.so | 52 | 6.51 - 8.00 | Fritzbox authentification helpers | AVM |
Depends on | lib | libavmcipher.so | 52 | 6.54 - 7.81 | AES / DES / Rijndael encryption / decryption. | AVM |
Depends on | lib | libavmcsock.so | 78 | 5.23 - 8.00 | Networking, I/O and helper functions | AVM |
Depends on | lib | libavmfbconf.so | 29 | 7.39 - 7.81 | API to hardcoded fbconf.cfg | AVM |
Depends on | lib | libavmfbstate.so | 32 | 7.39 - 7.81 | IPC fritzbox state notification | AVM |
Depends on | lib | libavmhmac.so | 62 | 6.35 - 8.00 | HMAC / SHA / MD5 hashing. | AVM |
Depends on | lib | libavmwdt.so | 22 | 7.61 - 8.00 | AVM-Watchdogs management API | AVM |
Depends on | lib | libboxenv.so | 21 | 7.90 - 8.00 | API to the rc.conf enhanced Config-Environment | AVM |
Depends on | lib | libboxlib.so | 58 | 6.35 - 7.81 | Box status, logging and statistics functions | AVM |
Depends on | lib | libboxnotify.so | 1 | 6.35 | boxnotifyd client API (old) | AVM |
Depends on | lib | libc.so | 78 | 5.23 - 8.00 | Standard C library | Linux |
Depends on | lib | libcm.so | 78 | 5.23 - 8.00 | ctlmgr / cm_logic messaging API | AVM |
Depends on | lib | libcore.so | 22 | 7.61 - 8.00 | Gathers the MAC addresses of the device and maintains its device mode. | AVM |
Depends on | lib | libcrypto.so | 52 | 6.54 - 7.81 | OpenSSL general crypto and X.509 library | Linux |
Depends on | lib | libdl.so | 64 | 5.23 - 8.00 | Dynamic linking library | Linux |
Depends on | lib | libdputil.so | 58 | 6.35 - 7.81 | DataPipe / packet utilities | AVM |
Depends on | lib | libewnwjson.so | 32 | 7.39 - 7.81 | JSON helper functions | AVM |
Depends on | lib | libewnwlinux.so | 60 | 6.35 - 8.00 | Linux networking functions | AVM |
Depends on | lib | libewnwnet.so | 62 | 6.35 - 8.00 | Internet helper functions | AVM |
Depends on | lib | libfbconf.so | 22 | 7.61 - 8.00 | API to hardcoded fbconf.cfg | AVM |
Depends on | lib | libgcc_s.so | 33 | 5.23 - 6.110 | GCC low-level runtime library | Linux |
Depends on | lib | libjuisclient.so | 52 | 6.54 - 7.81 | Update-Search - second generation - JUIS | AVM |
Depends on | lib | liblua.so | 78 | 5.23 - 8.00 | Lua 5.1.4 interpreter library | Linux |
Depends on | lib | libm.so | 64 | 5.23 - 8.00 | C math library | Linux |
Depends on | lib | liboauth2.so | 32 | 7.39 - 7.81 | OAuth v2.0 authentificator | Linux |
Depends on | lib | libpthread.so | 64 | 5.23 - 8.00 | POSIX threading library | Linux |
Depends on | lib | librt.so | 48 | 6.35 - 8.00 | POSIX realtime extensions library | Linux |
Depends on | lib | libslab_c++.so | 25 | 7.90 - 8.00 | C++ slab allocator | AVM |
Depends on | lib | libsvctl.so | 46 | 7.19 - 8.00 | supervisor notification library | AVM |
Depends on | lib | libtiinterpreter.so | 32 | 7.39 - 7.81 | Preprocessor for SSI-Files by TI. | AVM |
Depends on | lib | libwdt.so | 71 | 5.23 - 7.81 | AVM-Watchdogs management API | AVM |
Depends on | lib | libwebkpiclient.so | 32 | 7.39 - 8.00 | KPI sensor for system parts which use HTTP / HTTPS | AVM |
Depends on | lib | libwebsrv.so | 58 | 6.35 - 8.00 | HTTP / HTTPS webserver and tools. | AVM |
Depends on | lib | libyajl.so | 32 | 7.39 - 7.81 | Event-driven JSON parser | Linux |
Depends on | lib | libz.so | 50 | 6.83 - 8.00 | Zlib compressor / decompressor | Linux |
37 dependencies for this command |
Model-Matrix
Daily updated index of the presence, path and size of this command for each model. Last update: 2024-12-21 05:44 GMT.
Showing all models using this command. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom/rtl)
label in the Model
column shows which CPU is meant for Multi-Linux models.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.
Model | Firmware | Path | Size |
---|---|---|---|
FRITZ!Box WLAN 3270 | 5.29 - 5.54 | /bin | 10.9k - 11.0k |
FRITZ!Box WLAN 3270 v3 | 5.29 - 5.54 | /bin | 10.9k - 11.0k |
FRITZ!Box WLAN 3270 IT | 5.51 - 5.52 | /bin | 10.9k - 11.0k |
FRITZ!Box 3272 (main) | 5.50 - 6.89 | /bin | 10.9k - 11.3k |
FRITZ!Box WLAN 3370 (main) | 5.29 - 6.56 | /bin | 10.5k - 11.2k |
FRITZ!Box 3390 (main) | 5.50 - 6.56 | /bin | 10.5k - 11.2k |
FRITZ!Box 3490 (main) | 6.20 - 7.30 | /bin | 10.1k - 14.1k |
FRITZ!Box 4020 | /bin | 10.1k - 10.6k | |
FRITZ!Box 4040 | 6.52 - 8.00 | /bin | 7.4k - 9.4k |
FRITZ!Box 4050 | 7.58 - 7.90 | /bin | 9.3k |
FRITZ!Box 4060 | 7.29 - 7.90 | /bin | 9.2k - 9.3k |
FRITZ!Box 5490 (main) | 6.51 - 7.29 | /bin | 10.1k - 14.1k |
FRITZ!Box 5491 (main) | 7.01 - 7.29 | /bin | 10.1k - 14.1k |
FRITZ!Box 5530 Fiber (main) | 7.21 - 8.00 | /bin | 10.0k - 14.0k |
FRITZ!Box 5590 Fiber (main) | 7.29 - 8.00 | /bin | 9.2k - 9.3k |
FRITZ!Box 5690 Pro (main) | 7.62 | /bin | 9.3k |
FRITZ!Box 6320 Cable v1 | 6.03 - 6.04 | /bin | 8.1k |
FRITZ!Box 6320 Cable v2 | 6.21 | /bin | 8.1k |
FRITZ!Box 6340 Cable | 5.24 | /bin | 11.1k |
FRITZ!Box 6360 Cable | 5.25 - 6.51 | /bin | 8.1k - 11.1k |
FRITZ!Box 6430 Cable (arm) | 6.84 - 7.29 | /bin | 7.8k - 9.3k |
FRITZ!Box 6430 Cable (atom) | 6.84 - 7.29 | /bin | 7.8k - 9.2k |
FRITZ!Box 6490 Cable (arm) | 6.20 - 7.51 | /bin | 7.3k - 9.3k |
FRITZ!Box 6490 Cable (atom) | 6.20 - 7.51 | /bin | 7.8k - 13.1k |
FRITZ!Box 6590 Cable (arm) | 6.84 - 7.57 | /bin | 7.3k - 9.3k |
FRITZ!Box 6590 Cable (atom) | 6.83 - 7.51 | /bin | 7.8k - 13.1k |
FRITZ!Box 6591 Cable (arm) | 7.04 - 8.00 | /bin | 8.5k - 9.7k |
FRITZ!Box 6591 Cable (atom) | 7.04 - 8.00 | /bin | 8.5k - 13.5k |
FRITZ!Box 6660 Cable (arm) | 7.14 - 8.00 | /bin | 9.5k - 9.7k |
FRITZ!Box 6660 Cable (atom) | 7.14 - 8.00 | /bin | 9.3k - 13.5k |
FRITZ!Box 6670 Cable (arm) | 7.61 - 7.90 | /bin | 9.5k - 9.6k |
FRITZ!Box 6670 Cable (atom) | 7.61 - 7.90 | /bin | 13.4k - 13.5k |
FRITZ!Box 6690 Cable (arm) | 7.28 - 7.90 | /bin | 9.5k - 9.7k |
FRITZ!Box 6690 Cable (atom) | 7.28 - 7.90 | /bin | 9.3k - 13.5k |
FRITZ!Box 6810 LTE | 6.35 | /bin | 10.9k - 11.2k |
FRITZ!Box 6820 LTE v1 (main) | 6.40 - 7.59 | /bin | 10.1k - 14.2k |
FRITZ!Box 6820 LTE v2 (main) | 6.40 - 7.59 | /bin | 10.1k - 14.2k |
FRITZ!Box 6820 LTE v3 (main) | 7.19 - 7.57 | /bin | 14.1k - 14.2k |
FRITZ!Box 6820 LTE v4 | 7.59 | /bin | 14.2k |
FRITZ!Box 6840 LTE (main) | 5.23 - 6.88 | /bin | 10.4k - 11.2k |
FRITZ!Box 6842 LTE | /bin | 10.9k - 11.2k | |
FRITZ!Box 6850 LTE | 7.21 - 7.90 | /bin | 9.3k - 14.0k |
FRITZ!Box 6850 5G | 7.24 - 7.90 | /bin | 9.3k - 9.4k |
FRITZ!Box 6890 LTE (main) | 6.84 - 7.57 | /bin | 9.9k - 14.1k |
FRITZ!Box 6890 LTE v1 (main) | 6.84 - 7.57 | /bin | 9.9k - 14.1k |
FRITZ!Box 6890 LTE v2 (main) | 6.84 - 7.57 | /bin | 9.9k - 14.1k |
FRITZ!Box Fon WLAN 7240 | 5.29 - 6.06 | /bin | 10.9k - 11.0k |
FRITZ!Box Fon WLAN 7270 v2 | 5.27 - 6.06 | /bin | 10.9k - 11.1k |
FRITZ!Box Fon WLAN 7270 v3 | 5.27 - 6.06 | /bin | 10.9k - 11.1k |
FRITZ!Box 7272 (main) | 5.55 - 6.88 | /bin | 10.9k - 11.3k |
FRITZ!Box 7312 | 5.29 - 6.56 | /bin | 10.9k - 11.3k |
FRITZ!Box Fon WLAN 7320 | 5.29 - 6.35 | /bin | 10.9k - 11.3k |
FRITZ!Box 7330 | 5.29 - 6.56 | /bin | 10.9k - 11.3k |
FRITZ!Box 7330 SL | 5.29 - 6.56 | /bin | 10.9k - 11.3k |
FRITZ!Box Fon WLAN 7340 | /bin | 11.0k - 11.2k | |
FRITZ!Box Fon WLAN 7360 SL | 5.29 - 6.34 | /bin | 10.9k - 11.3k |
FRITZ!Box Fon WLAN 7360 v1 | 5.29 - 6.36 | /bin | 10.9k - 11.3k |
FRITZ!Box Fon WLAN 7360 v2 | 5.29 - 6.88 | /bin | 10.4k - 11.2k |
FRITZ!Box 7362 SL (main) | 5.53 - 7.18 | /bin | 10.1k - 14.1k |
FRITZ!Box 7369 (main) | 6.30 - 6.32 | /bin | 11.2k |
FRITZ!Box Fon WLAN 7390 | /bin | 10.9k - 11.3k | |
FRITZ!Box 7412 (main) | 6.21 - 6.88 | /bin | 10.4k - 11.2k |
FRITZ!Box 7430 (main) | 6.26 - 7.31 | /bin | 10.1k - 14.1k |
FRITZ!Box 7490 (main) | 5.57 - 7.51 | /bin | 10.1k - 14.1k |
FRITZ!Box 7510 | 7.30 - 8.00 | /bin | 9.2k - 9.3k |
FRITZ!Box 7520 | 6.98 - 8.00 | /bin | 7.5k - 9.4k |
FRITZ!Box 7520 v2 (main) | 7.30 - 8.00 | /bin | 9.3k - 9.4k |
FRITZ!Box 7530 | 6.98 - 8.00 | /bin | 7.4k - 9.4k |
FRITZ!Box 7530 AX | 7.20 - 8.00 | /bin | 9.4k - 9.6k |
FRITZ!Box 7560 (main) | 6.51 - 7.30 | /bin | 10.1k - 14.1k |
FRITZ!Box 7580 (main) | 6.53 - 7.30 | /bin | 10.1k - 14.1k |
FRITZ!Box 7581 | 6.54 - 7.18 | /bin | 7.8k - 13.4k |
FRITZ!Box 7582 | 6.83 - 7.18 | /bin | 7.8k - 13.4k |
FRITZ!Box 7583 (main) | 7.01 - 7.59 | /bin | 10.1k - 14.1k |
FRITZ!Box 7583 VDSL (main) | 7.19 - 8.00 | /bin | 10.0k - 14.0k |
FRITZ!Box 7590 (main) | 6.83 - 8.00 | /bin | 9.9k - 14.1k |
FRITZ!Box 7590 AX (main) | 7.19 - 8.00 | /bin | 9.9k - 14.0k |
FRITZ!Box 7690 | 7.61 - 7.90 | /bin | 9.3k |
78 models use this command |
Symbols
Daily updated index of all symbols of this command. Last update: 2024-12-21 07:44 GMT.
Firmware | Symbol |
---|---|
5.23 - 7.31 | LuaScript_MakeFunction |
7.08 - 7.31 | get_any_string_arg |
5.23 - 7.31 | get_string_arg |
5.23 - 8.00 | main |
4 symbols for this command |