Merge pull request #1818 from dibdot/lxc_fix
[project/luci.git] / contrib / package / meshwizard / files / usr / bin / meshwizard / helpers / setup_wan_static.sh
1 #!/bin/sh
2 # Setup static interface settings for wan if wan is not an olsr interface
3
4 [ ! "$(uci -q get network.wan)" == "interface" ] && exit
5
6 . /lib/functions.sh
7 . $dir/functions.sh
8
9 uci batch << EOF
10 set network.wan.proto='$wan_proto'
11 set network.wan.ipaddr='$wan_ip4addr'
12 set network.wan.netmask='$wan_netmask'
13 set network.wan.gateway='$wan_gateway'
14 set network.wan.dns='$wan_dns'
15 EOF
16
17 uci_commitverbose "Setup static ip settings for wan" network
18
19 uci delete meshwizard.wan && uci commit meshwizard
20