Packages: rpcd (profile-rooted plugin/ACL dirs, iwinfo plugin, headers), ustream-ssl (OpenSSL), uhttpd (ubus + ucode handlers), iwinfo, lucihttp, cgi-io, rpcd-mod-luci and luci (luci-base, status/system/network, Bootstrap, luci-app-firewall) from one LuCI checkout, with server-side FHS paths rewritten to the system profile. Services: rpcd-service-type, uhttpd-service-type (self-signed cert at first start), luci-service-type (dispatcher at /cgi-bin/luci, UCI seeds and uci-defaults, symlinks for the OpenWrt paths browser views exec and ACLs name). uci-service-type takes extensions. netifd gains ifup/ifdown; firewall4 the fw3 link LuCI's menu looks for. procd-compat: methods declare ubus_rpc_session (ucode rejects undeclared arguments, PITFALLS #41); config.change refreshes reload_config's digest so rpcd-applied changes don't hide later ones. Checked in headless Chromium: all menu pages load without errors; Save & Apply with confirm and with automatic rollback reloads the firewall (PITFALLS #42). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
diff --git a/modules/luci-base/ucode/sys.uc b/modules/luci-base/ucode/sys.uc
|
|
index 4e85236..f2aa303 100644
|
|
--- a/modules/luci-base/ucode/sys.uc
|
|
+++ b/modules/luci-base/ucode/sys.uc
|
|
@@ -8,9 +8,11 @@ export function process_list() {
|
|
let line, list = [];
|
|
|
|
for (let line = top.read('line'); length(line); line = top.read('line')) {
|
|
- let m = match(trim(line), /^([0-9]+) +([0-9]+) +(.+) +([RSDZTWI][<NW ][<N ]) +([0-9]+m?) +([0-9]+%) +([0-9]+%) +(.+)$/);
|
|
+ // OpenWrt's busybox prints `%VSZ %CPU' as `12%'; others (with
|
|
+ // FEATURE_TOP_DECIMALS and SMP_PROCESS) as `0.1 CPU 0.0'.
|
|
+ let m = match(trim(line), /^([0-9]+) +([0-9]+) +(.+) +([RSDZTWI][<NW ][<N ]) +([0-9]+m?) +([0-9.]+%?) +([0-9]+ +)?([0-9.]+%?) +(.+)$/);
|
|
|
|
- if (m && m[8] != '/bin/busybox top -bn1') {
|
|
+ if (m && !match(m[9], /busybox top -bn1$/)) {
|
|
push(list, {
|
|
PID: m[1],
|
|
PPID: m[2],
|
|
@@ -18,8 +20,8 @@ export function process_list() {
|
|
STAT: m[4],
|
|
VSZ: m[5],
|
|
'%MEM': m[6],
|
|
- '%CPU': m[7],
|
|
- COMMAND: m[8]
|
|
+ '%CPU': m[8],
|
|
+ COMMAND: m[9]
|
|
});
|
|
}
|
|
}
|