luci-base, luci-proto-*: rename getOpkgPackage -> getPackageName

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
Paul Donald
2024-12-15 20:11:23 +01:00
parent 500ce17e7a
commit 8d13ea410d
44 changed files with 48 additions and 46 deletions

View 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. * This function should be overwritten by protocol specific subclasses.
* *
* @abstract * @abstract
* *
* @returns {string} * @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. * function, e.g. `odhcp6c` for the `dhcpv6` protocol.
*/ */
getOpkgPackage: function() { getPackageName: function() {
return null; return null;
}, },

View File

@@ -47,7 +47,7 @@ return network.registerProtocol('3g', {
return this._ubus('l3_device') || '3g-%s'.format(this.sid); return this._ubus('l3_device') || '3g-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'comgt'; return 'comgt';
}, },

View File

@@ -6,7 +6,7 @@ return network.registerProtocol('autoip', {
return _('Avahi IPv4LL'); return _('Avahi IPv4LL');
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'avahi-autoipd'; return 'avahi-autoipd';
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('batadv', {
return this._ubus('l3_device') || this.sid; return this._ubus('l3_device') || this.sid;
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'kmod-batman-adv'; return 'kmod-batman-adv';
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('batadv_hardif', {
return this._ubus('l3_device') || this.sid; return this._ubus('l3_device') || this.sid;
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'kmod-batman-adv'; return 'kmod-batman-adv';
}, },

View File

@@ -132,7 +132,7 @@ return network.registerProtocol('bonding', {
return null; return null;
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'bonding'; return 'bonding';
}, },

View File

@@ -7,7 +7,7 @@ return network.registerProtocol('external', {
return _('Externally managed interface'); return _('Externally managed interface');
}, },
getOpkgPackage: function() { getPackageName: function() {
return "external-protocol"; return "external-protocol";
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('gre', {
return this._ubus('l3_device') || 'gre4-%s'.format(this.sid); return this._ubus('l3_device') || 'gre4-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'gre'; return 'gre';
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('gretap', {
return this._ubus('l3_device') || 'gre4t-%s'.format(this.sid); return this._ubus('l3_device') || 'gre4t-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'gre'; return 'gre';
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('grev6', {
return this._ubus('l3_device') || 'gre6-%s'.format(this.sid); return this._ubus('l3_device') || 'gre6-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'gre'; return 'gre';
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('grev6tap', {
return this._ubus('l3_device') || 'gre6t-%s'.format(this.sid); return this._ubus('l3_device') || 'gre6t-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'gre'; return 'gre';
}, },

View File

@@ -7,7 +7,7 @@ return network.registerProtocol('hnet', {
return _('Automatic Homenet (HNCP)'); return _('Automatic Homenet (HNCP)');
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'hnet-full'; return 'hnet-full';
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('ipip', {
return this._ubus('l3_device') || 'ipip-%s'.format(this.sid); return this._ubus('l3_device') || 'ipip-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'ipip'; return 'ipip';
}, },

View File

@@ -15,7 +15,7 @@ return network.registerProtocol('464xlat', {
return this._ubus('l3_device') || '464-%s'.format(this.sid); return this._ubus('l3_device') || '464-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return '464xlat'; return '464xlat';
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('6in4', {
return this._ubus('l3_device') || '6in4-%s'.format(this.sid); return this._ubus('l3_device') || '6in4-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return '6in4'; return '6in4';
}, },

View File

@@ -13,7 +13,7 @@ return network.registerProtocol('6rd', {
return this._ubus('l3_device') || '6rd-%s'.format(this.sid); return this._ubus('l3_device') || '6rd-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return '6rd'; return '6rd';
}, },

View File

@@ -13,7 +13,7 @@ return network.registerProtocol('6to4', {
return this._ubus('l3_device') || '6to4-%s'.format(this.sid); return this._ubus('l3_device') || '6to4-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return '6rd'; return '6rd';
}, },

View File

@@ -7,7 +7,7 @@ return network.registerProtocol('dhcpv6', {
return _('DHCPv6 client'); return _('DHCPv6 client');
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'odhcp6c'; return 'odhcp6c';
}, },

View File

@@ -15,7 +15,7 @@ return network.registerProtocol('dslite', {
return this._ubus('l3_device') || 'ds-%s'.format(this.sid); return this._ubus('l3_device') || 'ds-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'ds-lite'; return 'ds-lite';
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('ipip6', {
return this._ubus('l3_device') || 'ipip6-%s'.format(this.sid); return this._ubus('l3_device') || 'ipip6-%s'.format(this.sid);
}, },
getOpkgPackage: function () { getPackageName: function () {
return 'ds-lite'; return 'ds-lite';
}, },

View File

@@ -17,7 +17,7 @@ return network.registerProtocol('map', {
return this._ubus('l3_device') || 'map-%s'.format(this.sid); return this._ubus('l3_device') || 'map-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'map-t'; return 'map-t';
}, },

View File

@@ -28,7 +28,7 @@ return network.registerProtocol('mbim', {
return this._ubus('l3_device') || 'mbim-%s'.format(this.sid); return this._ubus('l3_device') || 'mbim-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'umbim'; return 'umbim';
}, },

View File

@@ -25,7 +25,7 @@ return network.registerProtocol('modemmanager', {
return this._ubus('l3_device') || 'modemmanager-%s'.format(this.sid); return this._ubus('l3_device') || 'modemmanager-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'modemmanager'; return 'modemmanager';
}, },

View File

@@ -39,7 +39,7 @@ return network.registerProtocol('ncm', {
return this._ubus('l3_device') || 'wan'; return this._ubus('l3_device') || 'wan';
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'comgt-ncm'; return 'comgt-ncm';
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('nebula', {
return this._ubus('l3_device') || this.sid; return this._ubus('l3_device') || this.sid;
}, },
getOpkgPackage: function () { getPackageName: function () {
return 'nebula'; return 'nebula';
}, },

View File

@@ -69,7 +69,7 @@ return network.registerProtocol('openconnect', {
return this._ubus('l3_device') || 'vpn-%s'.format(this.sid); return this._ubus('l3_device') || 'vpn-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'openconnect'; return 'openconnect';
}, },

View File

@@ -67,7 +67,7 @@ return network.registerProtocol('openfortivpn', {
return this._ubus('l3_device') || 'vpn-%s'.format(this.sid); return this._ubus('l3_device') || 'vpn-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'openfortivpn'; return 'openfortivpn';
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('l2tp', {
return this._ubus('l3_device') || 'l2tp-%s'.format(this.sid); return this._ubus('l3_device') || 'l2tp-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'xl2tpd'; return 'xl2tpd';
}, },

View File

@@ -47,7 +47,7 @@ return network.registerProtocol('ppp', {
return this._ubus('l3_device') || 'ppp-%s'.format(this.sid); return this._ubus('l3_device') || 'ppp-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'ppp'; return 'ppp';
}, },

View File

@@ -32,7 +32,7 @@ return network.registerProtocol('pppoa', {
return this._ubus('l3_device') || 'pppoa-%s'.format(this.sid); return this._ubus('l3_device') || 'pppoa-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'ppp-mod-pppoa'; return 'ppp-mod-pppoa';
}, },

View File

@@ -32,7 +32,7 @@ return network.registerProtocol('pppoe', {
return this._ubus('l3_device') || 'pppoe-%s'.format(this.sid); return this._ubus('l3_device') || 'pppoe-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'ppp-mod-pppoe'; return 'ppp-mod-pppoe';
}, },

View File

@@ -32,7 +32,7 @@ return network.registerProtocol('pptp', {
return this._ubus('l3_device') || 'pptp-%s'.format(this.sid); return this._ubus('l3_device') || 'pptp-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'ppp-mod-pptp'; return 'ppp-mod-pptp';
}, },

View File

@@ -32,7 +32,7 @@ return network.registerProtocol('pppossh', {
return this._ubus('l3_device') || 'pppossh-%s'.format(this.sid); return this._ubus('l3_device') || 'pppossh-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'pppossh'; return 'pppossh';
}, },

View File

@@ -31,7 +31,7 @@ return network.registerProtocol('qmi', {
return this._ubus('l3_device') || 'qmi-%s'.format(this.sid); return this._ubus('l3_device') || 'qmi-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'uqmi'; return 'uqmi';
}, },

View File

@@ -68,7 +68,7 @@ return network.registerProtocol('relay', {
return 'relay-%s'.format(this.sid); return 'relay-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'relayd'; return 'relayd';
}, },

View File

@@ -13,7 +13,7 @@ return network.registerProtocol('sstp', {
return this._ubus('l3_device') || 'sstp-%s'.format(this.sid); return this._ubus('l3_device') || 'sstp-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'sstp-client'; return 'sstp-client';
}, },

View File

@@ -12,7 +12,7 @@ return network.registerProtocol('unet', {
return this._ubus('l3_device') || this.sid; return this._ubus('l3_device') || this.sid;
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'unetd'; return 'unetd';
}, },

View File

@@ -13,7 +13,7 @@ return network.registerProtocol('vpnc', {
return this._ubus('l3_device') || 'vpn-%s'.format(this.sid); return this._ubus('l3_device') || 'vpn-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'vpnc'; return 'vpnc';
}, },

View File

@@ -14,7 +14,7 @@ return network.registerProtocol('vti', {
return this._ubus('l3_device') || 'vti-%s'.format(this.sid); return this._ubus('l3_device') || 'vti-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'vti'; return 'vti';
}, },

View File

@@ -15,7 +15,7 @@ return network.registerProtocol('vxlan', {
return this._ubus('l3_device') || 'vxlan-%s'.format(this.sid); return this._ubus('l3_device') || 'vxlan-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'vxlan'; return 'vxlan';
}, },

View File

@@ -15,7 +15,7 @@ return network.registerProtocol('vxlan6', {
return this._ubus('l3_device') || 'vxlan-%s'.format(this.sid); return this._ubus('l3_device') || 'vxlan-%s'.format(this.sid);
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'vxlan'; return 'vxlan';
}, },

View File

@@ -109,7 +109,7 @@ return network.registerProtocol('wireguard', {
return this._ubus('l3_device') || this.sid; return this._ubus('l3_device') || this.sid;
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'wireguard-tools'; return 'wireguard-tools';
}, },

View File

@@ -13,7 +13,7 @@ return network.registerProtocol('xfrm', {
return this._ubus('l3_device') || this.sid; return this._ubus('l3_device') || this.sid;
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'xfrm'; return 'xfrm';
}, },

View File

@@ -210,7 +210,7 @@ return network.registerProtocol('yggdrasil',
getType: function() { getType: function() {
return "tunnel"; return "tunnel";
}, },
getOpkgPackage: function() { getPackageName: function() {
return 'yggdrasil'; return 'yggdrasil';
}, },
isFloating: function() { isFloating: function() {