mirror of
https://github.com/openwrt/luci
synced 2025-01-07 03:27:12 +08:00
luci-compat: opkg_package -> package_name
opkg is no longer available as the generic name for package-manager Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
parent
0459c378b7
commit
367b67faa7
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user