diff options
-rw-r--r-- | templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def new file mode 100644 index 00000000..7cfd25af --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def @@ -0,0 +1,19 @@ +type: txt +help: Set BGP MD5 password +syntax:expression: exec " \ + if [ `echo $VAR(@) | wc -c` -gt 80 ]; then \ + echo Password must be 80 characters or less;\ + exit 1 ; \ + fi ; " +update: if [ -n "$VAR(../remote-as/@)" ]; then + peer="remote-as $VAR(../remote-as/@)"; + else + peer="peer-group $VAR(../peer-group/@)"; + fi; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router bgp $VAR(../../@)" \ + -c "neighbor $VAR(../@) $peer" \ + -c "neighbor $VAR(../@) password $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl \ + -c "configure terminal" -c "router bgp $VAR(../../@)" \ + -c "no neighbor $VAR(../@) password" |