From ef1952b6d89f2326c56932bfc07e19ff7f713a01 Mon Sep 17 00:00:00 2001 From: Yuya Kusakabe Date: Sat, 22 Jul 2017 22:31:25 +0900 Subject: Run script with vyattacfg group --- spec/bgp6/vyos1_script.sh | 4 ++++ spec/bgp6/vyos2_script.sh | 4 ++++ spec/bgp6/vyos3_script.sh | 4 ++++ spec/bgp6/vyos4_script.sh | 4 ++++ 4 files changed, 16 insertions(+) (limited to 'spec/bgp6') diff --git a/spec/bgp6/vyos1_script.sh b/spec/bgp6/vyos1_script.sh index 51dbac9..67e4624 100644 --- a/spec/bgp6/vyos1_script.sh +++ b/spec/bgp6/vyos1_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols bgp 65536 neighbor fd00:5679:4f53:1::c ebgp-multihop 2 diff --git a/spec/bgp6/vyos2_script.sh b/spec/bgp6/vyos2_script.sh index e6c9187..ea4c67c 100644 --- a/spec/bgp6/vyos2_script.sh +++ b/spec/bgp6/vyos2_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols bgp 65537 neighbor fd00:5679:4f53:1::b ebgp-multihop 2 diff --git a/spec/bgp6/vyos3_script.sh b/spec/bgp6/vyos3_script.sh index 1016f55..4fd8d3e 100644 --- a/spec/bgp6/vyos3_script.sh +++ b/spec/bgp6/vyos3_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols static route6 fd00:5679:4f53:3::/64 next-hop fd00:5679:4f53:2::b diff --git a/spec/bgp6/vyos4_script.sh b/spec/bgp6/vyos4_script.sh index 4354cb4..fa1cd7e 100644 --- a/spec/bgp6/vyos4_script.sh +++ b/spec/bgp6/vyos4_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols static route6 fd00:5679:4f53:2::/64 next-hop fd00:5679:4f53:3::b -- cgit v1.2.3