luci-base: rename mii-tool object property to mii_tool
authorPaul Donald <newtwen+github@gmail.com>
Thu, 19 Dec 2024 22:38:23 +0000 (22:38 +0000)
committerPaul Donald <newtwen+github@gmail.com>
Thu, 19 Dec 2024 22:38:23 +0000 (22:38 +0000)
otherwise ucode function call breaks with:

RPC call to luci/getInitList failed with error -32000: Object not found

Follow-up fix to ab15b5e379717be5e194bc3992ae13960b973f18

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
modules/luci-base/root/usr/share/rpcd/ucode/luci
modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js

index de3ca20b8d099da8d83466d6c26131ea33d27b25..0e3104186cbaf0ad3c19f3e07395c4664c509c86 100644 (file)
@@ -197,7 +197,7 @@ const methods = {
                                firewall4:  access('/sbin/fw4') == true,
                                opkg:       access('/bin/opkg') == true,
                                bonding:    access('/sys/module/bonding'),
-                               mii-tool:   access('/usr/sbin/mii-tool'),
+                               mii_tool:   access('/usr/sbin/mii-tool'),
                                offloading: access('/sys/module/xt_FLOWOFFLOAD/refcnt') == true || access('/sys/module/nft_flow_offload/refcnt') == true,
                                br2684ctl:  access('/usr/sbin/br2684ctl') == true,
                                swconfig:   access('/sbin/swconfig') == true,
index e7bfd59fdeeff4bdee3b37c29fd2001d373cbaa4..31a2bf029ee2d50cbb1d5496fbeab3edb3f6a728 100644 (file)
@@ -869,7 +869,7 @@ return baseclass.extend({
                o.depends('type', 'bonding');
 
                o = this.replaceOption(s, 'devadvanced', form.ListValue, 'monitor_mode', _('Link monitoring mode'),
-                       !L.hasSystemFeature('mii-tool') ? '<a href="' + L.url("admin", "system", "package-manager", "?query=mii-tool") + '">'+
+                       !L.hasSystemFeature('mii_tool') ? '<a href="' + L.url("admin", "system", "package-manager", "?query=mii-tool") + '">'+
                         _('Install %s').format('<code>mii-tool</code>') + '</a>' : null);
                o.default = '';
                o.value('arp', _('ARP link monitoring'));