💋 Sync 2026-10-11 00:16:14
Merge-upstream / merge (push) Canceled after 0s

This commit is contained in:
github-actions[bot] committed 2026-10-11 00:16:14 +08:00
1 parent c7bafc635d
commit c71da84035
264 files changed
+8169 -3944

No files matched your search

@@ -0,0 +1,24 @@
'use strict';
let ubus = require('ubus');
let state = { calls: [], timeout: false };
function popen(command, mode) {
push(state.calls, command);
if (state.timeout) return null;
let name = match(command, /\"name\":\"([^\"]+)\"/);
let service_name = name ? name[1] : null;
let instance = service_name ? ubus.state.services[service_name] : null;
let response = {};
if (instance != null) response[service_name] = instance;
return {
read: function() { return sprintf('%J', response); },
close: function() { return true; }
};
}
return {
state: state,
popen: popen,
unlink: function() { return true; }
};