luci-base, luci-proto-*: rename getOpkgPackage -> getPackageName
authorPaul Donald <newtwen+github@gmail.com>
Sun, 15 Dec 2024 19:11:23 +0000 (20:11 +0100)
committerPaul Donald <newtwen+github@gmail.com>
Sun, 15 Dec 2024 19:13:56 +0000 (20:13 +0100)
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
44 files changed:
modules/luci-base/htdocs/luci-static/resources/network.js
protocols/luci-proto-3g/htdocs/luci-static/resources/protocol/3g.js
protocols/luci-proto-autoip/htdocs/luci-static/resources/protocol/autoip.js
protocols/luci-proto-batman-adv/htdocs/luci-static/resources/protocol/batadv.js
protocols/luci-proto-batman-adv/htdocs/luci-static/resources/protocol/batadv_hardif.js
protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js
protocols/luci-proto-external/htdocs/luci-static/resources/protocol/external.js
protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/gre.js
protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/gretap.js
protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/grev6.js
protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/grev6tap.js
protocols/luci-proto-hnet/htdocs/luci-static/resources/protocol/hnet.js
protocols/luci-proto-ipip/htdocs/luci-static/resources/protocol/ipip.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/464xlat.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6in4.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6rd.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6to4.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/dhcpv6.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/dslite.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/ipip6.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/map.js
protocols/luci-proto-mbim/htdocs/luci-static/resources/protocol/mbim.js
protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js
protocols/luci-proto-ncm/htdocs/luci-static/resources/protocol/ncm.js
protocols/luci-proto-nebula/htdocs/luci-static/resources/protocol/nebula.js
protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js
protocols/luci-proto-openfortivpn/htdocs/luci-static/resources/protocol/openfortivpn.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/l2tp.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/ppp.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoa.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoe.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pptp.js
protocols/luci-proto-pppossh/htdocs/luci-static/resources/protocol/pppossh.js
protocols/luci-proto-qmi/htdocs/luci-static/resources/protocol/qmi.js
protocols/luci-proto-relay/htdocs/luci-static/resources/protocol/relay.js
protocols/luci-proto-sstp/htdocs/luci-static/resources/protocol/sstp.js
protocols/luci-proto-unet/htdocs/luci-static/resources/protocol/unet.js
protocols/luci-proto-vpnc/htdocs/luci-static/resources/protocol/vpnc.js
protocols/luci-proto-vti/htdocs/luci-static/resources/protocol/vti.js
protocols/luci-proto-vxlan/htdocs/luci-static/resources/protocol/vxlan.js
protocols/luci-proto-vxlan/htdocs/luci-static/resources/protocol/vxlan6.js
protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js
protocols/luci-proto-xfrm/htdocs/luci-static/resources/protocol/xfrm.js
protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js

index d9a0ef24c068a586feb1bd467822f3533d6b893b..5f77d8354a4b30b2668999a1a491ac1b1200d978 100644 (file)
@@ -2452,17 +2452,19 @@ Protocol = baseclass.extend(/** @lends LuCI.network.Protocol.prototype */ {
        },
 
        /**
-        * Get the name of the opkg package providing the protocol functionality.
+        * Gets the name of the package providing the protocol functionality. The
+        * package is available via the system default package manager. This is used
+        * when a config refers to a protocol handler which is not yet installed.
         *
         * This function should be overwritten by protocol specific subclasses.
         *
         * @abstract
         *
         * @returns {string}
-        * Returns the name of the opkg package required for the protocol to
+        * Returns the name of the package to download, required for the protocol to
         * function, e.g. `odhcp6c` for the `dhcpv6` protocol.
         */
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return null;
        },
 
index 1e0cb6ba33d8fb2ab8a1721e0c526532ac7a2d51..fe3239f9dc6fe7654c82159df99aa55081bb380e 100644 (file)
@@ -47,7 +47,7 @@ return network.registerProtocol('3g', {
                return this._ubus('l3_device') || '3g-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'comgt';
        },
 
index 5c8ead45d6fb0bb37829d3842a402b96454aff4e..b9b16da1e392dad3f97e5f483361aa492203e1fe 100644 (file)
@@ -6,7 +6,7 @@ return network.registerProtocol('autoip', {
                return _('Avahi IPv4LL');
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'avahi-autoipd';
        },
 
index 2e90e41cfa3adcdc9f7e811716bca692f8d41997..53331b2ee8bfeaf680b526151ec3cd9b1862da8b 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('batadv', {
                return this._ubus('l3_device') || this.sid;
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'kmod-batman-adv';
        },
 
index b8b1263b97cd3f14435d4ceb22003613eae78951..40a5b5f553f8830b96662fc88ae9b7ca69b26157 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('batadv_hardif', {
                return this._ubus('l3_device') || this.sid;
        },
        
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'kmod-batman-adv';
        },
        
index 5309931a2a6540d549df303d98aaf200a178fb85..3eb62f4144348249beefa61c57b1cd0ee3c9bb3b 100644 (file)
@@ -132,7 +132,7 @@ return network.registerProtocol('bonding', {
                return null;
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'bonding';
        },
 
index 06bd5f3f6699964933fee7179cb8b0ddb8637712..b76fad21d4124b5dff094d9a1e260c5fa77c215a 100644 (file)
@@ -7,7 +7,7 @@ return network.registerProtocol('external', {
                return _('Externally managed interface');
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return "external-protocol";
        },
 
index 91837b29c31af48497d2ae01986e09f81fd892a2..9452f68ed225d87870366e8747cb05c9bec522be 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('gre', {
                return this._ubus('l3_device') || 'gre4-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'gre';
        },
 
index e1e9c8c39c0385e4b76f7baf702740b664be6d97..beebd77fbbca9938ae0ac453bfa79a2a6c81eeec 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('gretap', {
                return this._ubus('l3_device') || 'gre4t-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'gre';
        },
 
index 97b84754ffc6318b8a0285db4a1297cd9d70ae43..fdfeb6e3f16d802f419b5c5bac8601c6ddaee4fc 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('grev6', {
                return this._ubus('l3_device') || 'gre6-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'gre';
        },
 
index 6203f835572c55097d13dcfea9eaf4d567b73157..cd0564267f9f93dce31edb44e252971a3eb8b19a 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('grev6tap', {
                return this._ubus('l3_device') || 'gre6t-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'gre';
        },
 
index 5762ab7bf2e401c48d283b48c72567a277093b0e..5161260a42793a8f9999ac9235776aff278511f5 100644 (file)
@@ -7,7 +7,7 @@ return network.registerProtocol('hnet', {
                return _('Automatic Homenet (HNCP)');
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'hnet-full';
        },
 
index 44a0e20ac649a453dfefdcf68187cbc5cd84a261..1ce97f0864b47ce55b6032491449b6ab4752f621 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('ipip', {
                return this._ubus('l3_device') || 'ipip-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'ipip';
        },
 
index 9cfdadd9a6dd7f48ac1fd8ff15f6d3f34395bfa1..3f1fc6b0ac18a58402abbcbe5cb5c206d95034ee 100644 (file)
@@ -15,7 +15,7 @@ return network.registerProtocol('464xlat', {
                return this._ubus('l3_device') || '464-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return '464xlat';
        },
 
index 92540570ef0cc81f9263b71596e5357f4c9c0dc3..aa509a13f81564010656e134dd1c35805d15a241 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('6in4', {
                return this._ubus('l3_device') || '6in4-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return '6in4';
        },
 
index 415c3a89e795e9c04350ec7c344c99f44f5e8692..db27b4e2d675f53b4cbff616c9a0a40eec73f154 100644 (file)
@@ -13,7 +13,7 @@ return network.registerProtocol('6rd', {
                return this._ubus('l3_device') || '6rd-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return '6rd';
        },
 
index f572562332cadc38e21f887ac38d9c36259d94bb..d479bfc6585e94f1e9aac46533237743eb9322a4 100644 (file)
@@ -13,7 +13,7 @@ return network.registerProtocol('6to4', {
                return this._ubus('l3_device') || '6to4-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return '6rd';
        },
 
index 3984ce1334b9da990130e9ba731189239a4ef172..ed2d39990015f5890655c222cad257b0698dcc45 100644 (file)
@@ -7,7 +7,7 @@ return network.registerProtocol('dhcpv6', {
                return _('DHCPv6 client');
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'odhcp6c';
        },
 
index 5981973e311fe3bfd33bec8ca1197d7fe00632f1..cd7d548e008b1127d6da7b0705949bde8ad2d9f2 100644 (file)
@@ -15,7 +15,7 @@ return network.registerProtocol('dslite', {
                return this._ubus('l3_device') || 'ds-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'ds-lite';
        },
 
index 6f38317f49e2bb33ce2bcdd110bcbbaad485dc96..11ca875190b14be49ffb9cb33dca85bf6afe4eeb 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('ipip6', {
                return this._ubus('l3_device') || 'ipip6-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function () {
+       getPackageName: function () {
                return 'ds-lite';
        },
 
index 82e016921030904e085f7143f5a93a35c40e6f36..471608b5aeee4271042120d3b025c5ee5a30cf9f 100644 (file)
@@ -17,7 +17,7 @@ return network.registerProtocol('map', {
                return this._ubus('l3_device') || 'map-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'map-t';
        },
 
index f6f548cc657471b1af31828e3cb2794e054b129e..82472a3459f8212b6d06e58cec50d597616009e6 100644 (file)
@@ -28,7 +28,7 @@ return network.registerProtocol('mbim', {
                return this._ubus('l3_device') || 'mbim-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'umbim';
        },
 
index 9a311e42ec52254c8513dc486b8fbecaeee5a5f8..6db25631b478c4b047e1211eb1ef86748d12f04a 100644 (file)
@@ -25,7 +25,7 @@ return network.registerProtocol('modemmanager', {
                return this._ubus('l3_device') || 'modemmanager-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'modemmanager';
        },
 
index 28d65fceb1505f069b52d48cb5296f383b35499a..42891853a0145ea1488bb961d3d229558c0432ee 100644 (file)
@@ -39,7 +39,7 @@ return network.registerProtocol('ncm', {
                return this._ubus('l3_device') || 'wan';
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'comgt-ncm';
        },
 
index 409416dd49240242a321330a4fdd801ae248ebb7..9ee863629c420b43f65c548c75a072b81eae714b 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('nebula', {
                return this._ubus('l3_device') || this.sid;
        },
 
-       getOpkgPackage: function () {
+       getPackageName: function () {
                return 'nebula';
        },
 
index f9c1af6cd5dee4791bfa881463fe8a2f41257ace..05c559ce84d6611772999f86ba7fa7e7d224101d 100644 (file)
@@ -69,7 +69,7 @@ return network.registerProtocol('openconnect', {
                return this._ubus('l3_device') || 'vpn-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'openconnect';
        },
 
index 530eeea4fff28c1f3f8f6b82d044ea405c74d8b3..ae26aaa569de58ad43d63ac5b09f18c665c4af5e 100644 (file)
@@ -67,7 +67,7 @@ return network.registerProtocol('openfortivpn', {
                return this._ubus('l3_device') || 'vpn-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'openfortivpn';
        },
 
index 59eb0b8be397c18a8718c26243bf93e7436ae877..e1af7ca1f553838e297aed0e100c93cd43a18232 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('l2tp', {
                return this._ubus('l3_device') || 'l2tp-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'xl2tpd';
        },
 
index c7f7103125d5ee431252dfe5fa89918a777fb3c8..626d5e2a5dfbb38154a5922e8bfd616f71741b54 100644 (file)
@@ -47,7 +47,7 @@ return network.registerProtocol('ppp', {
                return this._ubus('l3_device') || 'ppp-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'ppp';
        },
 
index b1f945caf99e45e4515dd5a9cba442b3964053a6..a65ae310e8e8b5a6358a4b4bc1c423cd7801869e 100644 (file)
@@ -32,7 +32,7 @@ return network.registerProtocol('pppoa', {
                return this._ubus('l3_device') || 'pppoa-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'ppp-mod-pppoa';
        },
 
index d028a18a87fef39cf927cd668bf8d216825c18e5..12dec9b9c80d3e3f1b13c098d6e1862bab71f2dc 100644 (file)
@@ -32,7 +32,7 @@ return network.registerProtocol('pppoe', {
                return this._ubus('l3_device') || 'pppoe-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'ppp-mod-pppoe';
        },
 
index 3ee6e69cb12cee1b9ba0090792d3d252e60a800e..7ed2dc5506627570333d834617b59d4ab7152e9d 100644 (file)
@@ -32,7 +32,7 @@ return network.registerProtocol('pptp', {
                return this._ubus('l3_device') || 'pptp-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'ppp-mod-pptp';
        },
 
index bc1345ee3e7866cc3cc83dcfcaeda6b4e92ff121..cb6f8265b10ae691792cdd4be621a4064d33a8e6 100644 (file)
@@ -32,7 +32,7 @@ return network.registerProtocol('pppossh', {
                return this._ubus('l3_device') || 'pppossh-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'pppossh';
        },
 
index 1963bc0412d827ad59f74144ee58061ae6caef94..607c97b181cf5a970bf9636ac08fdcaa237a881f 100644 (file)
@@ -31,7 +31,7 @@ return network.registerProtocol('qmi', {
                return this._ubus('l3_device') || 'qmi-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'uqmi';
        },
 
index b3082276b12da841ab114bb1a197845ec673de05..174142f18be6dd50cad344e4b391bb29eb8491ec 100644 (file)
@@ -68,7 +68,7 @@ return network.registerProtocol('relay', {
                return 'relay-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'relayd';
        },
 
index f58f553c36a07ce71764ab9fc375ba41906eae07..f4e08016956f7d6230aaa47747a23e2a1c79ee37 100644 (file)
@@ -13,7 +13,7 @@ return network.registerProtocol('sstp', {
                return this._ubus('l3_device') || 'sstp-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'sstp-client';
        },
 
index ea9d9c50e2ca1b1ec20f0c7be1027e02beb674d3..49a372368f0f7e24354ebcb3ce361a7b8797496d 100644 (file)
@@ -12,7 +12,7 @@ return network.registerProtocol('unet', {
                return this._ubus('l3_device') || this.sid;
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'unetd';
        },
 
index bec6c7ffa26cd27802b39566a241eecd69123a87..bf6e7d14991dd0c3923abf27613bdb1dc1058455 100644 (file)
@@ -13,7 +13,7 @@ return network.registerProtocol('vpnc', {
                return this._ubus('l3_device') || 'vpn-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'vpnc';
        },
 
index bbf037230a7c6f4db0953b70fccb9c6ad59ae6d3..c53e8d482313bc9dc331ee6315a78ddef241c0fa 100644 (file)
@@ -14,7 +14,7 @@ return network.registerProtocol('vti', {
                return this._ubus('l3_device') || 'vti-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'vti';
        },
 
index d5f0ac9c125e1dc40617673193296b8ff4d2a43b..4ae209f2a640f0c4832ed925090f4b22cf1145be 100644 (file)
@@ -15,7 +15,7 @@ return network.registerProtocol('vxlan', {
                return this._ubus('l3_device') || 'vxlan-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'vxlan';
        },
 
index 3bf6a50c6ac511d40eff5509cfb98f163dbb0c01..3c46666299d96787a3a025b33e47dce99743bed7 100644 (file)
@@ -15,7 +15,7 @@ return network.registerProtocol('vxlan6', {
                return this._ubus('l3_device') || 'vxlan-%s'.format(this.sid);
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'vxlan';
        },
 
index a3ce76c96c8771958cc3fa63722e1f65eec63045..40efd1c45d5387c9316cc6848331ae1efa18b59f 100644 (file)
@@ -109,7 +109,7 @@ return network.registerProtocol('wireguard', {
                return this._ubus('l3_device') || this.sid;
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'wireguard-tools';
        },
 
index 8be3b54783320e7a5aecda26e6448c1d84d70a25..8003686cba97a93fd5e3e04a47630cd82ca2f480 100644 (file)
@@ -13,7 +13,7 @@ return network.registerProtocol('xfrm', {
                return this._ubus('l3_device') || this.sid;
        },
 
-       getOpkgPackage: function() {
+       getPackageName: function() {
                return 'xfrm';
        },
 
index f216f8b16fd004e28aa71fb13c1e83ed582736da..31dc173ba39661605d2962922fc009c6dc656935 100644 (file)
@@ -210,7 +210,7 @@ return network.registerProtocol('yggdrasil',
                getType: function() {
                        return "tunnel";
                },
-               getOpkgPackage: function() {
+               getPackageName: function() {
                        return 'yggdrasil';
                },
                isFloating: function() {