From e23f6069d6fb91d75147f908bd15d2ee96e6a5d7 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Sun, 15 Dec 2024 21:08:56 +0100 Subject: [PATCH] luci-mod-network: remove old netifd version check which needs opkg master and 24 use much newer versions. This will prevent a read error on the non-existent control file when the system uses apk. Signed-off-by: Paul Donald --- .../luci-static/resources/view/network/interfaces.js | 12 ++++-------- .../root/usr/share/rpcd/acl.d/luci-mod-network.json | 1 - 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index 5575f39a2001..f262aed39cba 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -324,7 +324,6 @@ return view.extend({ network.getDSLModemType(), network.getDevices(), fs.lines('/etc/iproute2/rt_tables'), - L.resolveDefault(fs.read('/usr/lib/opkg/info/netifd.control')), uci.changes() ]); }, @@ -424,14 +423,11 @@ return view.extend({ }, render: function(data) { - var netifdVersion = (data[3] || '').match(/Version: ([^\n]+)/); - if (netifdVersion && netifdVersion[1] >= "2021-05-26") { - if (this.interfaceBridgeWithIfnameSections().length) - return this.renderBridgeMigration(); - else if (this.deviceWithIfnameSections().length || this.interfaceWithIfnameSections().length) - return this.renderIfnameMigration(); - } + if (this.interfaceBridgeWithIfnameSections().length) + return this.renderBridgeMigration(); + else if (this.deviceWithIfnameSections().length || this.interfaceWithIfnameSections().length) + return this.renderIfnameMigration(); var dslModemType = data[0], netDevs = data[1], diff --git a/modules/luci-mod-network/root/usr/share/rpcd/acl.d/luci-mod-network.json b/modules/luci-mod-network/root/usr/share/rpcd/acl.d/luci-mod-network.json index 7571e7000577..002a6d085d75 100644 --- a/modules/luci-mod-network/root/usr/share/rpcd/acl.d/luci-mod-network.json +++ b/modules/luci-mod-network/root/usr/share/rpcd/acl.d/luci-mod-network.json @@ -8,7 +8,6 @@ "/proc/sys/net/ipv6/conf/*/mtu": [ "read" ], "/proc/sys/net/ipv6/conf/*/hop_limit": [ "read" ], "/usr/libexec/luci-peeraddr": [ "exec" ], - "/usr/lib/opkg/info/netifd.control": [ "read" ], "/proc/sys/net/ipv[46]/conf/*": [ "read" ], "/sys/class/net/*/brport/*": [ "read" ] },