[RFC 1/6] base-files: ucidef net dev altname, label and alias.

Evan Jobling evan.jobling at mslsc.com.au
Wed Oct 9 01:07:14 PDT 2024


In addition to path, conduit and gro options.

Allow setting options for a label pass, in
case of conflicts with the path variable.

For example in the Firebox M300
default interface names are eth0-eth7
with eth3-eth7 being ports on a dsa switch.
eth3 and eth4 start out as being the conduit
interfaces.

Also allow for setting the altname and alias
in board.json for future implementation.

Signed-off-by: Evan Jobling <evan.jobling at mslsc.com.au>
---
 .../base-files/files/lib/functions/uci-defaults.sh   | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index 8355099c35..7997e49d83 100644
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -122,6 +122,18 @@ ucidef_set_network_device_path() {
 	_ucidef_set_network_device_common $1 path $2
 }
 
+ucidef_set_network_device_label() {
+	_ucidef_set_network_device_common $1 label $2
+}
+
+ucidef_set_network_device_altname() {
+	_ucidef_set_network_device_common $1 altname $2
+}
+
+ucidef_set_network_device_alias() {
+	_ucidef_set_network_device_common $1 alias $2
+}
+
 ucidef_set_network_device_gro() {
 	_ucidef_set_network_device_common $1 gro $2
 }
-- 
2.39.5




More information about the openwrt-devel mailing list