summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/sys.lua
AgeCommit message (Collapse)Author
2019-11-02luci-base: sys.lua: lazy-load luci.model.networkJo-Philipp Wich
This allows using luci.sys without installed luci.model.network class. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-24luci-mod-system: reimplement flashops as client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12luci-base: sys.lua: fix init script enable actionJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: add sys.init.reload() and sys.init.restart() actionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-06-28luci-base: show niced processes on Status/Processes pageHannu Nyman
Modify the process status filter to allow also the processes with a nice value to be visible on the Status/Processes page. Filter out the top process itself. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2019-06-03luci-base: handle dhcp lease from odhcpdAnsuel Smith
Currently only the dnsmasq lease file is read for hostname hint. If someone use only odhcpd as dhcp daemon the hostname resolution on wifi_assoc list is broken. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2019-06-03luci-base: adds duid_to_mac to sys.luaAnsuel Smith
Move duid_to_mac function from status.lua to sys.lua. Implement translation from DUID-LL without header to MAC Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-11-14luci-base: add luci.sys.process.exec()Jo-Philipp Wich
The new process.exec() function simplifies spawning external processes and capturing their stdio. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-09-08modules: add backup module for mtdblock devicesRosy Song
Signed-off-by: Rosy Song <rosysong@rosinson.com>
2018-04-05treewide: filter shell arguments through shellquote() where applicableJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-12treewide: unify mac address handlingJo-Philipp Wich
Use the new luci.ip MAC address facilities to parse and verify MAC addresses in a common way, instead of relying on various ad-hoc solutions. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-11luci-base: fix parsing of ethers(5)Jo-Philipp Wich
The /etc/ethers file may contain any number of white space characters between the mac address and the IP/hostname field, so extend the pattern to allow for that. Man ethers(5) also states that the IP field may be a symbolic hostname, so test whether the name is an IP address or hostname before adding it to the hints structure. Fixes #1674. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-03luci-base: fix luci.sys.wifi.getiwinfo() on radio namesJo-Philipp Wich
Fall back to using a phy-wide iwinfo handle if the vif query yields no result. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-02luci-base: rework wireless state handling (#1179)Jo-Philipp Wich
- fix mapping of ubus wireless state to uci declared vifs - fix leaking foreign vif info into per-phy iwinfo stats Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-07-28luci-base: let luci.sys.net.devices() return all netdevsJo-Philipp Wich
The previous implementation of the function only returned ethernet interfaces because it relied on the AF_PACKET family entries returned by getifaddrs(). Change the function to simply collect all interface names it sees in order to avoid missing tunnel interfaces. Fixes FS#917. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-07-11luci-base: use rpcd-mod-rrdns for reverse DNS lookupsJo-Philipp Wich
Drop the individual calls to nixio.getnameinfo() in luci.sys.net and rely on the "network.rrdns.lookup" ubus call instead to fetch domain information within a guaranteed timeout. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-07-11luci-base: drop unused functions in luci.sysJo-Philipp Wich
Drop a number of redundant functions from luci.sys to shrink the code a bit: * luci.sys.net.arptable() - replaced by luci.ip.neighbors() * luci.sys.net.routes() - replaced by luci.ip.routes() * luci.sys.net.routes6() - replaced by luci.ip.routes6() * luci.sys.net.deviceinfo() - replaced by nixio.getaddrinfo() * luci.sys.net.pingtest() - no known user Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-02-20luci-base: luci.sys: canonicalize src and dest addrs in luci.sys.net.conntrack()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2016-02-02luci-base: fix parsing of non-TCP streams in conntrack tableJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2016-01-21sys.lua _nethints(): read location of dhcp.lease file from uciChristian Schoenebeck
status.lua - change default directory of dhcp.leases file sys.lua - read location of dhcp.leases file from uci Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-01-20luci-base: luci.sys.net: use luci.ip.neighbors() instead of /proc/net/arpJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2016-01-20luci-base: add luci.sys.net.host_hints() and regenerate documentationJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-12-09luci-base: rewrite luci.sys.net.conntrack()Jo-Philipp Wich
The new function is twice as fast as the old implementation and properly summarizes outgoing and incoming byte and packet counters. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-27luci-base: eliminiate use of uci state vars in luci.sysJo-Philipp Wich
Rewrite `luci.sys.wifi.getiwinfo()` to use the ubus wireless state instead of depreacated uci state vars in order to map abstract network notation to wireless ifnames. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-29Move inline documentation into separate files.Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-22luci-base: remove unused functions from luci.sys.netJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-16Globally reduce copyright headersJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-15luci-mod-base: drop luci.sys.sysinfo() and luci.sys.loadavg()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-08Rework LuCI build systemJo-Philipp Wich
* 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>