Age | Commit message (Collapse) | Author |
|
In mod metamethod, execute string format under pcall() and rethrow error in
caller context to report caller of function in errors and not the meta
method itself.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Using tristate is counter-intuitive and probably doesn't provide a lot
of benefit so we use a boolean and treat "don't know" as false (because
it is safer than showing options that are not actually available).
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
|
|
Some packages have different variants that have different
capabilities depending on which libraries against which
they are linked. Add a function to check which library a
binary links against in order to determine available
functionality.
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
|
|
Fix a bug introduced by #561
Function 'shellsqescape' calls 'gsub' with the empty result string 'res'
instead of the actual parameter 'value'. This leads into error:
.../util.lua:160: bad argument #1 to 'gsub' (string expected, got nil)
Fix error by passing the correct parameter to the function.
After the fix, the unmount button introduced by #561 finally works.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
When using os.execute or luci.sys.call the shell is called with the
command line which means that standard shell interpretation of strings
occurs. To allow to use these commands more easily we add functions
for properly escaping single-quoted strings used on the command line
|
|
Add dependency on luci-lib-jsonc and use it to
reimplement luci.util.serialize_json().
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Add luci.util.ubus() convenience wrapper which establishes a connection on
the first call.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
* Rename subdirectories to their repective OpenWrt package names
* Make each LuCI module its own standalone package
* Deploy a shared luci.mk which is used by each module Makefile
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|