<p dir="ltr">On Oct 28, 2015 5:56 AM, "Yousong Zhou" <<a href="mailto:yszhou4tech@gmail.com">yszhou4tech@gmail.com</a>> wrote:<br>
><br>
> This is almost the default config of OpenWrt targets (currently even<br>
> those sunxi boards with only one ethernet interface use static IP<br>
> address for its lan interface).</p>
<p dir="ltr">And this is intend intended, because Malta is primarily used under qemu, from which you get your network to be NAT'd or bridged from/with the host. Your change would force an user to reconfigure the network on boot, and that seems like a less sensible default to me.</p>
<p dir="ltr">><br>
> While at it, also configure a wan interface if eth1 exists.<br>
><br>
> Signed-off-by: Yousong Zhou <<a href="mailto:yszhou4tech@gmail.com">yszhou4tech@gmail.com</a>><br>
> ---<br>
>  target/linux/malta/base-files/etc/uci-defaults/02-network |    5 ++++-<br>
>  1 file changed, 4 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/target/linux/malta/base-files/etc/uci-defaults/02-network b/target/linux/malta/base-files/etc/uci-defaults/02-network<br>
> index e90ecbe..1b22ec5 100644<br>
> --- a/target/linux/malta/base-files/etc/uci-defaults/02-network<br>
> +++ b/target/linux/malta/base-files/etc/uci-defaults/02-network<br>
> @@ -3,4 +3,7 @@<br>
>  . /lib/functions/uci-defaults.sh<br>
><br>
>  ucidef_set_interface_loopback<br>
> -ucidef_set_interface_raw "lan" "eth0" "dhcp"<br>
> +ucidef_set_interface_lan "eth0"<br>
> +if [ -d "/sys/class/net/eth1" ]; then<br>
> +       ucidef_set_interface_wan "eth1"<br>
> +fi<br>
> --<br>
> 1.7.10.4<br>
</p>