From 2f35b555a1fb51935a14d25e175c936b7ceb9d82 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 18 Jun 2010 10:29:03 -0700 Subject: Remove sudo from tunnel command Don't need sudo for ip command anymore. --- templates/interfaces/tunnel/node.def | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'templates') diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def index 2a80592e..a90c01f9 100644 --- a/templates/interfaces/tunnel/node.def +++ b/templates/interfaces/tunnel/node.def @@ -24,17 +24,17 @@ create:if [ -n "$VAR(./key/@)" ]; then exit 1; fi if [ "$VAR(./encapsulation/@)" == "gre-bridge" ]; then - sudo ip link add $VAR(@) type gretap local $VAR(./local-ip/@) remote $VAR(./remote-ip/@) || + ip link add $VAR(@) type gretap local $VAR(./local-ip/@) remote $VAR(./remote-ip/@) || echo "interfaces tunnel $VAR(@): error creating tunnel interface" else - sudo ip tunnel add $VAR(@) local $VAR(./local-ip/@) remote $VAR(./remote-ip/@) mode $VAR(./encapsulation/@) $KEY || + ip tunnel add $VAR(@) local $VAR(./local-ip/@) remote $VAR(./remote-ip/@) mode $VAR(./encapsulation/@) $KEY || echo "interfaces tunnel $VAR(@): error creating tunnel interface" fi - sudo ip link set $VAR(@) $MC up || + ip link set $VAR(@) $MC up || echo "interfaces tunnel $VAR(@): error setting tunnel interface active" delete:if [ "$VAR(./encapsulation/@)" == "gre-bridge" ]; then - sudo ip link delete $VAR(@) + ip link delete $VAR(@) else - sudo ip tunnel del $VAR(@) + ip tunnel del $VAR(@) fi -- cgit v1.2.3