def_set_interfaces_lan_wan.patch 648 B

123456789101112
  1. --- a/target/linux/x86/base-files/etc/board.d/02_network
  2. +++ b/target/linux/x86/base-files/etc/board.d/02_network
  3. @@ -86,6 +86,9 @@ silicom-80500-0214-*)
  4. ucidef_set_network_device_path "eth3" "pci0000:00/0000:00:10.0/0000:07:00.0"
  5. ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3" "wan0"
  6. ;;
  7. +*)
  8. + [ "$(ip address | grep ^[0-9] | awk -F: '{print $2}' | sed "s/ //g" | grep '^[e]' | grep -cvE "(@|\.)")" -gt 2 ] && ucidef_set_interfaces_lan_wan "$(ip address | grep ^[0-9] | awk -F: '{print $2}' | sed "s/ //g" | grep '^[e]' | grep -vE "(@|\.|eth1)" | tr "\n" " " | sed "s/ $//")" "eth1"
  9. + ;;
  10. esac
  11. board_config_flush