1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix ifname on macvlan if needed

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-10-30 21:06:45 +01:00
parent e3a04f6478
commit 35c18c104a

View file

@ -67,6 +67,7 @@ _setup_interface() {
[ -z "$(uci -q get network.$1.masterintf)" ] && uci -q set network.$1.masterintf=$(uci -q get network.$1_dev.ifname)
[ -n "$(uci -q get network.$1.masterintf)" ] && uci -q set network.$1_dev.ifname=$(uci -q get network.$1.masterintf)
[ -z "$(uci -q get network.$1.macaddr)" ] && uci -q set network.$1_dev.macaddr=$(uci -q get network.$1.macaddr)
uci set network.$1.ifname=$1
uci -q commit network
return 0
}