From 5db776a29c90d05f864645e7e171840660f4b268 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 5 Feb 2009 16:42:48 -0800 Subject: Move sudo from vyatta-protocol to nodes Much cleaner to do sudo once rather than repeatedly --- templates/protocols/bgp/node.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/protocols/bgp') diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def index ca1ae005..ea3a9c4c 100644 --- a/templates/protocols/bgp/node.def +++ b/templates/protocols/bgp/node.def @@ -6,14 +6,14 @@ syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294 ; \ "AS number must be between 1 and 4294967294" create: if [ $(pgrep -c -x vyatta-bgpd) -eq 0 ] - then ${vyatta_sbindir}/vyatta-protocol start bgpd + then sudo ${vyatta_sbindir}/vyatta-protocol start bgpd fi vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(@)" update: vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(@)" \ -c "bgp network import-check" delete: vyatta-vtysh -c "configure terminal" -c "no router bgp $VAR(@)" if ! ${vyatta_sbindir}/vyatta-check-typeless-node.pl "protocols bgp" - then ${vyatta_sbindir}/vyatta-protocol stop bgpd + then sudo ${vyatta_sbindir}/vyatta-protocol stop bgpd fi -- cgit v1.2.3