2018-04-27 14:52:12 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. /lib/functions.sh
|
|
|
|
|
|
|
|
if [ "$(uci -q show network | grep omr6in4)" = "" ]; then
|
|
|
|
uci -q batch <<-EOF
|
|
|
|
set network.omr6in4=interface
|
|
|
|
set network.omr6in4.proto=6in4
|
|
|
|
set network.omr6in4.ip4table=vpn
|
|
|
|
set network.omr6in4.multipath=off
|
2018-06-07 20:43:16 +00:00
|
|
|
set network.omr6in4.ipaddr=10.255.255.2
|
|
|
|
set network.omr6in4.peeraddr=10.255.255.1
|
2018-04-27 14:52:12 +00:00
|
|
|
set network.omr6in4.gateway=fe80::a00:1
|
2018-07-03 13:11:54 +00:00
|
|
|
set network.omr6in4.ip6addr=fe80::a00:2
|
|
|
|
commit network
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2018-07-05 16:30:51 +00:00
|
|
|
if [ "$(uci -q get ucitrack.@network[-1].affects | grep omr6in4)" = "" ]; then
|
|
|
|
uci -q batch <<-EOF
|
|
|
|
add_list ucitrack.@network[-1].affects=omr6in4
|
|
|
|
commit ucitrack
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2018-07-03 13:11:54 +00:00
|
|
|
if [ "$(uci -q get network.omr6in4.ip6addr)" = "" ]; then
|
|
|
|
uci -q batch <<-EOF
|
|
|
|
set network.omr6in4.ip6addr=fe80::a00:2
|
2018-04-27 14:52:12 +00:00
|
|
|
commit network
|
2018-06-09 17:29:02 +00:00
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$(uci -q get firewall.zone_vpn.network | grep omr6in4)" = "" ]; then
|
|
|
|
uci -q batch <<-EOF
|
2018-06-07 14:53:08 +00:00
|
|
|
add_list firewall.zone_vpn.network=omr6in4
|
2018-04-27 16:10:41 +00:00
|
|
|
commit firewall
|
2018-04-27 14:52:12 +00:00
|
|
|
EOF
|
|
|
|
fi
|
2018-07-05 16:30:51 +00:00
|
|
|
rm -f /tmp/luci-indexcache
|
2018-04-27 14:52:12 +00:00
|
|
|
exit 0
|