2 getSystemInfo
: L
.rpc
.declare({
8 getBoardInfo
: L
.rpc
.declare({
14 getDiskInfo
: L
.rpc
.declare({
15 object
: 'luci2.system',
28 return L
.rpc
.flush().then(function(info
) {
31 $.extend(rv
, info
[0]);
32 $.extend(rv
, info
[1]);
33 $.extend(rv
, info
[2]);
40 initList
: L
.rpc
.declare({
41 object
: 'luci2.system',
43 expect
: { initscripts
: [ ] },
44 filter: function(data
) {
45 data
.sort(function(a
, b
) { return (a
.start
|| 0) - (b
.start
|| 0) });
50 initEnabled: function(init
, cb
)
52 return this.initList().then(function(list
) {
53 for (var i
= 0; i
< list
.length
; i
++)
54 if (list
[i
].name
== init
)
55 return !!list
[i
].enabled
;
61 initRun
: L
.rpc
.declare({
62 object
: 'luci2.system',
63 method
: 'init_action',
64 params
: [ 'name', 'action' ],
65 filter: function(data
) {
70 initStart: function(init
, cb
) { return L
.system
.initRun(init
, 'start', cb
) },
71 initStop: function(init
, cb
) { return L
.system
.initRun(init
, 'stop', cb
) },
72 initRestart: function(init
, cb
) { return L
.system
.initRun(init
, 'restart', cb
) },
73 initReload: function(init
, cb
) { return L
.system
.initRun(init
, 'reload', cb
) },
74 initEnable: function(init
, cb
) { return L
.system
.initRun(init
, 'enable', cb
) },
75 initDisable: function(init
, cb
) { return L
.system
.initRun(init
, 'disable', cb
) },
78 performReboot
: L
.rpc
.declare({
79 object
: 'luci2.system',