From: Paul Donald Date: Sun, 15 Dec 2024 19:34:15 +0000 (+0100) Subject: luci-compat: opkg_package -> package_name X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=367b67faa7ea07d2e5a786567886585c9a3781d0;p=project%2Fluci.git luci-compat: opkg_package -> package_name opkg is no longer available as the generic name for package-manager Signed-off-by: Paul Donald --- diff --git a/modules/luci-compat/luasrc/model/network.lua b/modules/luci-compat/luasrc/model/network.lua index 1c25f899da..e891b4fab5 100644 --- a/modules/luci-compat/luasrc/model/network.lua +++ b/modules/luci-compat/luasrc/model/network.lua @@ -1146,7 +1146,7 @@ function protocol.is_bridge(self) return (not self:is_virtual() and self:type() == "bridge") end -function protocol.opkg_package(self) +function protocol.package_name(self) return nil end diff --git a/modules/luci-compat/luasrc/model/network/proto_3g.lua b/modules/luci-compat/luasrc/model/network/proto_3g.lua index 60d8e2ebae..9c06a30a5e 100644 --- a/modules/luci-compat/luasrc/model/network/proto_3g.lua +++ b/modules/luci-compat/luasrc/model/network/proto_3g.lua @@ -22,7 +22,7 @@ function proto.is_installed(self) return nixio.fs.access("/lib/netifd/proto/3g.sh") end -function proto.opkg_package(self) +function proto.package_name(self) return "comgt" end diff --git a/modules/luci-compat/luasrc/model/network/proto_4x6.lua b/modules/luci-compat/luasrc/model/network/proto_4x6.lua index 4ab9a630c1..cd5db7b321 100644 --- a/modules/luci-compat/luasrc/model/network/proto_4x6.lua +++ b/modules/luci-compat/luasrc/model/network/proto_4x6.lua @@ -25,7 +25,7 @@ for _, p in ipairs({"dslite", "map", "464xlat"}) do return p .. "-" .. self.sid end - function proto.opkg_package(self) + function proto.package_name(self) if p == "dslite" or p == "ipip6" then return "ds-lite" elseif p == "map" then diff --git a/modules/luci-compat/luasrc/model/network/proto_6x4.lua b/modules/luci-compat/luasrc/model/network/proto_6x4.lua index 2fd0b11957..4e709e7f15 100644 --- a/modules/luci-compat/luasrc/model/network/proto_6x4.lua +++ b/modules/luci-compat/luasrc/model/network/proto_6x4.lua @@ -22,7 +22,7 @@ for _, p in ipairs({"6in4", "6to4", "6rd"}) do return p .. "-" .. self.sid end - function proto.opkg_package(self) + function proto.package_name(self) return p end diff --git a/modules/luci-compat/luasrc/model/network/proto_dhcpv6.lua b/modules/luci-compat/luasrc/model/network/proto_dhcpv6.lua index 0b45dad050..a0c0119c22 100644 --- a/modules/luci-compat/luasrc/model/network/proto_dhcpv6.lua +++ b/modules/luci-compat/luasrc/model/network/proto_dhcpv6.lua @@ -11,6 +11,6 @@ function proto.is_installed(self) return nixio.fs.access("/lib/netifd/proto/dhcpv6.sh") end -function proto.opkg_package(self) +function proto.package_name(self) return "odhcp6c" end diff --git a/modules/luci-compat/luasrc/model/network/proto_hnet.lua b/modules/luci-compat/luasrc/model/network/proto_hnet.lua index f525061be4..02801156f8 100644 --- a/modules/luci-compat/luasrc/model/network/proto_hnet.lua +++ b/modules/luci-compat/luasrc/model/network/proto_hnet.lua @@ -11,6 +11,6 @@ function proto.is_installed(self) return nixio.fs.access("/lib/netifd/proto/hnet.sh") end -function proto.opkg_package(self) +function proto.package_name(self) return "hnet-full" end diff --git a/modules/luci-compat/luasrc/model/network/proto_ipip.lua b/modules/luci-compat/luasrc/model/network/proto_ipip.lua index 04d2e78b09..1d6a37ffec 100644 --- a/modules/luci-compat/luasrc/model/network/proto_ipip.lua +++ b/modules/luci-compat/luasrc/model/network/proto_ipip.lua @@ -13,7 +13,7 @@ function proto.ifname(self) return "ipip-" .. self.sid end -function proto.opkg_package(self) +function proto.package_name(self) return "ipip" end diff --git a/modules/luci-compat/luasrc/model/network/proto_modemmanager.lua b/modules/luci-compat/luasrc/model/network/proto_modemmanager.lua index 3ad15dfd22..0c83f6e031 100644 --- a/modules/luci-compat/luasrc/model/network/proto_modemmanager.lua +++ b/modules/luci-compat/luasrc/model/network/proto_modemmanager.lua @@ -24,7 +24,7 @@ function proto.get_interface(self) return interface(self:ifname(), self) end -function proto.opkg_package(self) +function proto.package_name(self) return "modemmanager" end diff --git a/modules/luci-compat/luasrc/model/network/proto_ncm.lua b/modules/luci-compat/luasrc/model/network/proto_ncm.lua index 49abe23472..16c58fc623 100644 --- a/modules/luci-compat/luasrc/model/network/proto_ncm.lua +++ b/modules/luci-compat/luasrc/model/network/proto_ncm.lua @@ -26,7 +26,7 @@ function proto.get_i18n(self) return luci.i18n.translate("NCM") end -function proto.opkg_package(self) +function proto.package_name(self) return "comgt-ncm" end diff --git a/modules/luci-compat/luasrc/model/network/proto_openconnect.lua b/modules/luci-compat/luasrc/model/network/proto_openconnect.lua index 0944c7fe6a..596e7c8b0c 100644 --- a/modules/luci-compat/luasrc/model/network/proto_openconnect.lua +++ b/modules/luci-compat/luasrc/model/network/proto_openconnect.lua @@ -17,7 +17,7 @@ function proto.get_interface(self) return interface(self:ifname(), self) end -function proto.opkg_package(self) +function proto.package_name(self) return "openconnect" end diff --git a/modules/luci-compat/luasrc/model/network/proto_ppp.lua b/modules/luci-compat/luasrc/model/network/proto_ppp.lua index f87b30fcc1..e96b96ca23 100644 --- a/modules/luci-compat/luasrc/model/network/proto_ppp.lua +++ b/modules/luci-compat/luasrc/model/network/proto_ppp.lua @@ -26,7 +26,7 @@ for _, p in ipairs({"ppp", "pptp", "pppoe", "pppoa", "l2tp"}) do return p .. "-" .. self.sid end - function proto.opkg_package(self) + function proto.package_name(self) if p == "ppp" then return p elseif p == "pptp" then diff --git a/modules/luci-compat/luasrc/model/network/proto_pppossh.lua b/modules/luci-compat/luasrc/model/network/proto_pppossh.lua index a0e2a510c9..730132cd77 100644 --- a/modules/luci-compat/luasrc/model/network/proto_pppossh.lua +++ b/modules/luci-compat/luasrc/model/network/proto_pppossh.lua @@ -13,7 +13,7 @@ function proto.ifname(self) return "pppossh-" .. self.sid end -function proto.opkg_package(self) +function proto.package_name(self) return "pppossh" end diff --git a/modules/luci-compat/luasrc/model/network/proto_qmi.lua b/modules/luci-compat/luasrc/model/network/proto_qmi.lua index c414378d80..1c3176d331 100644 --- a/modules/luci-compat/luasrc/model/network/proto_qmi.lua +++ b/modules/luci-compat/luasrc/model/network/proto_qmi.lua @@ -24,7 +24,7 @@ function proto.get_interface(self) return interface(self:ifname(), self) end -function proto.opkg_package(self) +function proto.package_name(self) return "uqmi" end diff --git a/modules/luci-compat/luasrc/model/network/proto_relay.lua b/modules/luci-compat/luasrc/model/network/proto_relay.lua index 3b811d44d1..f02b5dcc5f 100644 --- a/modules/luci-compat/luasrc/model/network/proto_relay.lua +++ b/modules/luci-compat/luasrc/model/network/proto_relay.lua @@ -16,7 +16,7 @@ function proto.ifname(self) return "relay-" .. self.sid end -function proto.opkg_package(self) +function proto.package_name(self) return "relayd" end diff --git a/modules/luci-compat/luasrc/model/network/proto_vpnc.lua b/modules/luci-compat/luasrc/model/network/proto_vpnc.lua index 9a269a1283..06ef9a26ab 100644 --- a/modules/luci-compat/luasrc/model/network/proto_vpnc.lua +++ b/modules/luci-compat/luasrc/model/network/proto_vpnc.lua @@ -17,7 +17,7 @@ function proto.get_interface(self) return interface(self:ifname(), self) end -function proto.opkg_package(self) +function proto.package_name(self) return "vpnc" end diff --git a/modules/luci-compat/luasrc/model/network/proto_wireguard.lua b/modules/luci-compat/luasrc/model/network/proto_wireguard.lua index d6937618a7..8c73ac5b91 100644 --- a/modules/luci-compat/luasrc/model/network/proto_wireguard.lua +++ b/modules/luci-compat/luasrc/model/network/proto_wireguard.lua @@ -17,7 +17,7 @@ function proto.get_interface(self) return interface(self:ifname(), self) end -function proto.opkg_package(self) +function proto.package_name(self) return "wireguard-tools" end