summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-06-15 10:16:40 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-06-15 10:16:40 -0700
commit478766574f13b3fcfb934d7da161b5ac7238934a (patch)
tree38a5fcd2cf0b9b736598600ffa18dbd7583d8d58 /templates/interfaces/ethernet
parent85b19a9b420d0ee0682b4376c9a0428d52866473 (diff)
downloadvyatta-cfg-system-478766574f13b3fcfb934d7da161b5ac7238934a.tar.gz
vyatta-cfg-system-478766574f13b3fcfb934d7da161b5ac7238934a.zip
Remove sudo from brctl
Since brctl has cap_net_admin, don't need to use sudo
Diffstat (limited to 'templates/interfaces/ethernet')
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/node.def16
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def16
2 files changed, 16 insertions, 16 deletions
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/node.def
index 7590dc96..c56c31cc 100644
--- a/templates/interfaces/ethernet/node.tag/bridge-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/node.def
@@ -11,13 +11,13 @@ end:
exit 1
else
echo "Adding interface $ethif to bridge $newbridge."
- sudo brctl addif $newbridge $ethif;
+ /usr/sbin/brctl addif $newbridge $ethif;
if [ -n "$VAR(./cost/@)" ]; then
- sudo brctl setpathcost $newbridge $ethif $VAR(./cost/@);
+ /usr/sbin/brctl setpathcost $newbridge $ethif $VAR(./cost/@);
fi;
if [ -n "$VAR(./priority/@)" ]; then
- sudo brctl setportprio $newbridge $ethif $VAR(./priority/@);
+ /usr/sbin/brctl setportprio $newbridge $ethif $VAR(./priority/@);
fi
fi
elif [ ${COMMIT_ACTION} = 'DELETE' ]; then
@@ -31,7 +31,7 @@ end:
# it gets deleted before the removal of bridge-groups under interfaces
exit 0
else
- sudo brctl delif $oldbridge $ethif
+ /usr/sbin/brctl delif $oldbridge $ethif
fi
else
if [ -z "$newbridge" ]; then
@@ -45,15 +45,15 @@ end:
if ! /opt/vyatta/sbin/vyatta-bridgegroup-depedency.pl \
--bridge-notin-proposedcfg \
--bridge-interface="$oldbridge"; then \
- sudo brctl delif $oldbridge $ethif
+ /usr/sbin/brctl delif $oldbridge $ethif
fi
- sudo brctl addif $newbridge $ethif
+ /usr/sbin/brctl addif $newbridge $ethif
fi
if [ -n "$VAR(./cost/@)" ]; then
- sudo brctl setpathcost $newbridge $ethif $VAR(./cost/@)
+ /usr/sbin/brctl setpathcost $newbridge $ethif $VAR(./cost/@)
fi
if [ -n "$VAR(./priority/@)" ]; then
- sudo brctl setportprio $newbridge $ethif $VAR(./priority/@)
+ /usr/sbin/brctl setportprio $newbridge $ethif $VAR(./priority/@)
fi
fi
fi
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def
index dd3863a0..84fa14f1 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def
@@ -14,13 +14,13 @@ end:
exit 1
else
echo "Adding interface $ethif to bridge $newbridge."
- sudo brctl addif $newbridge $ethif;
+ /usr/sbin/brctl addif $newbridge $ethif;
if [ -n "$VAR(./cost/@)" ]; then
- sudo brctl setpathcost $newbridge $ethif $VAR(./cost/@);
+ /usr/sbin/brctl setpathcost $newbridge $ethif $VAR(./cost/@);
fi;
if [ -n "$VAR(./priority/@)" ]; then
- sudo brctl setportprio $newbridge $ethif $VAR(./priority/@);
+ /usr/sbin/brctl setportprio $newbridge $ethif $VAR(./priority/@);
fi
fi
elif [ ${COMMIT_ACTION} = 'DELETE' ]; then
@@ -34,7 +34,7 @@ end:
# it gets deleted before the removal of bridge-groups under interfaces
exit 0
else
- sudo brctl delif $oldbridge $ethif
+ /usr/sbin/brctl delif $oldbridge $ethif
fi
else
if [ -z "$newbridge" ]; then
@@ -48,15 +48,15 @@ end:
if ! /opt/vyatta/sbin/vyatta-bridgegroup-depedency.pl \
--bridge-notin-proposedcfg \
--bridge-interface="$oldbridge"; then \
- sudo brctl delif $oldbridge $ethif
+ /usr/sbin/brctl delif $oldbridge $ethif
fi
- sudo brctl addif $newbridge $ethif
+ /usr/sbin/brctl addif $newbridge $ethif
fi
if [ -n "$VAR(./cost/@)" ]; then
- sudo brctl setpathcost $newbridge $ethif $VAR(./cost/@)
+ /usr/sbin/brctl setpathcost $newbridge $ethif $VAR(./cost/@)
fi
if [ -n "$VAR(./priority/@)" ]; then
- sudo brctl setportprio $newbridge $ethif $VAR(./priority/@)
+ /usr/sbin/brctl setportprio $newbridge $ethif $VAR(./priority/@)
fi
fi
fi