9 # Always exit on errors.
13 ipaddr0=`ifconfig $interface0 | awk '/inet/{print $2}' | cut -f2 -d ":" | awk 'NR==1 {print $1}'`
16 ipaddr1=`ifconfig $interface1 | awk '/inet/{print $2}' | cut -f2 -d ":" | awk 'NR==1 {print $1}'`
18 net_config=/etc/config/network
19 cat >> $net_config << EOF
20 config interface 'wan'
21 option ifname '$interface0'
23 option ipaddr '$ipaddr0'
24 option netmask '255.255.255.0'
26 config interface 'wanb'
27 option ifname '$interface1'
29 option ipaddr '$ipaddr1'
30 option netmask '255.255.255.0'
37 /etc/init.d/rpcd start
38 /etc/init.d/dnsmasq start
39 /etc/init.d/network start
40 /etc/init.d/odhcpd start
41 /etc/init.d/uhttpd start
43 /etc/init.d/dropbear start
44 /etc/init.d/mwan3 restart
46 echo "Entering sleep... (success)"
49 while true; do sleep 100; done
57 k8s.v1.cni.cncf.io/networks: '[{ "name": "ovn-networkobj"}]'
58 k8s.plugin.opnfv.org/nfn-network: '{ "type": "ovn4nfv", "interface": [{ "name": "ovn-port-net", "interface": "net0" , "defaultGateway": "false"},
59 { "name": "ovn-priv-net", "interface": "net1" , "defaultGateway": "false"}]}'
63 image: hle2/openwrt-1806-mwan3:v0.1.0
70 imagePullPolicy: IfNotPresent
79 name: sdwan-config-ovn