From 01c7bacb821448e911e5b3519c8095849903d9b2 Mon Sep 17 00:00:00 2001 From: Ycarus Date: Thu, 5 Jul 2018 18:30:51 +0200 Subject: [PATCH] reload omr-6in4 after network changes --- omr-6in4/files/etc/uci-defaults/9010-omr-6in4 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/omr-6in4/files/etc/uci-defaults/9010-omr-6in4 b/omr-6in4/files/etc/uci-defaults/9010-omr-6in4 index 012388735..d877d5e11 100755 --- a/omr-6in4/files/etc/uci-defaults/9010-omr-6in4 +++ b/omr-6in4/files/etc/uci-defaults/9010-omr-6in4 @@ -14,15 +14,21 @@ if [ "$(uci -q show network | grep omr6in4)" = "" ]; then set network.omr6in4.ip6addr=fe80::a00:2 commit network EOF - rm -f /tmp/luci-indexcache fi +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 + + if [ "$(uci -q get network.omr6in4.ip6addr)" = "" ]; then uci -q batch <<-EOF set network.omr6in4.ip6addr=fe80::a00:2 commit network EOF - rm -f /tmp/luci-indexcache fi if [ "$(uci -q get firewall.zone_vpn.network | grep omr6in4)" = "" ]; then @@ -30,6 +36,6 @@ if [ "$(uci -q get firewall.zone_vpn.network | grep omr6in4)" = "" ]; then add_list firewall.zone_vpn.network=omr6in4 commit firewall EOF - rm -f /tmp/luci-indexcache fi +rm -f /tmp/luci-indexcache exit 0