base-files: add ucidef_set_interface_netdev_range function
authorTil Kaiser <[email protected]>
Fri, 22 Nov 2024 14:20:10 +0000 (15:20 +0100)
committerRobert Marko <[email protected]>
Mon, 6 Oct 2025 17:06:26 +0000 (19:06 +0200)
commit055d877a207afa6a270c6bee7e7f92969a41d66e
tree8d6426ae1a364d43067ddff1cdfa15e0e30e52ba
parent8edcd772db0086898b09d73d359bdc9d96b241ba
base-files: add ucidef_set_interface_netdev_range function

The ucidef_set_interface* functions can be used to
add network interfaces to a default network configuration.
Such network interfaces often have the same base interface
name (e.g., eth* or lan*). On devices with many network ports,
adding all ports to the default config can become inconvenient.

This commit adds a new uci function ucidef_set_interface_netdev_range,
which adds network interfaces for a specific port range to a given
OpenWrt interface. The first parameter is the OpenWrt interface, the
second is the base interface name, the third is the port start, and
the fourth is the port end range.

Signed-off-by: Til Kaiser <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/17251
Signed-off-by: Robert Marko <[email protected]>
package/base-files/files/lib/functions/uci-defaults.sh