summaryrefslogtreecommitdiff
path: root/templates/interfaces/bonding
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/bonding
parent85b19a9b420d0ee0682b4376c9a0428d52866473 (diff)
downloadvyatta-cfg-quagga-478766574f13b3fcfb934d7da161b5ac7238934a.tar.gz
vyatta-cfg-quagga-478766574f13b3fcfb934d7da161b5ac7238934a.zip
Remove sudo from brctl
Since brctl has cap_net_admin, don't need to use sudo
Diffstat (limited to 'templates/interfaces/bonding')
-rw-r--r--templates/interfaces/bonding/node.tag/bridge-group/node.def16
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/node.def16
2 files changed, 16 insertions, 16 deletions
diff --git a/templates/interfaces/bonding/node.tag/bridge-group/node.def b/templates/interfaces/bonding/node.tag/bridge-group/node.def
index 940295fa..9ce97b1b 100644
--- a/templates/interfaces/bonding/node.tag/bridge-group/node.def
+++ b/templates/interfaces/bonding/node.tag/bridge-group/node.def
@@ -12,13 +12,13 @@ end:
exit 1
else
echo "Adding interface $bondif to bridge $newbridge."
- sudo brctl addif $newbridge $bondif;
+ /usr/sbin/brctl addif $newbridge $bondif;
if [ -n "$VAR(./cost/@)" ]; then
- sudo brctl setpathcost $newbridge $bondif $VAR(./cost/@);
+ /usr/sbin/brctl setpathcost $newbridge $bondif $VAR(./cost/@);
fi;
if [ -n "$VAR(./priority/@)" ]; then
- sudo brctl setportprio $newbridge $bondif $VAR(./priority/@);
+ /usr/sbin/brctl setportprio $newbridge $bondif $VAR(./priority/@);
fi
fi
elif [ ${COMMIT_ACTION} = 'DELETE' ]; then
@@ -32,7 +32,7 @@ end:
# it gets deleted before the removal of bridge-groups under interfaces
exit 0
else
- sudo brctl delif $oldbridge $bondif
+ /usr/sbin/brctl delif $oldbridge $bondif
fi
else
if [ -z "$newbridge" ]; then
@@ -46,15 +46,15 @@ end:
if ! /opt/vyatta/sbin/vyatta-bridgegroup-depedency.pl \
--bridge-notin-proposedcfg \
--bridge-interface="$oldbridge"; then \
- sudo brctl delif $oldbridge $bondif
+ /usr/sbin/brctl delif $oldbridge $bondif
fi
- sudo brctl addif $newbridge $bondif
+ /usr/sbin/brctl addif $newbridge $bondif
fi
if [ -n "$VAR(./cost/@)" ]; then
- sudo brctl setpathcost $newbridge $bondif $VAR(./cost/@)
+ /usr/sbin/brctl setpathcost $newbridge $bondif $VAR(./cost/@)
fi
if [ -n "$VAR(./priority/@)" ]; then
- sudo brctl setportprio $newbridge $bondif $VAR(./priority/@)
+ /usr/sbin/brctl setportprio $newbridge $bondif $VAR(./priority/@)
fi
fi
fi
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/node.def
index 04dc957b..42234106 100644
--- a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/node.def
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/node.def
@@ -13,13 +13,13 @@ end:
exit 1
else
echo "Adding interface $bondif to bridge $newbridge."
- sudo brctl addif $newbridge $bondif;
+ /usr/sbin/brctl addif $newbridge $bondif;
if [ -n "$VAR(./cost/@)" ]; then
- sudo brctl setpathcost $newbridge $bondif $VAR(./cost/@);
+ /usr/sbin/brctl setpathcost $newbridge $bondif $VAR(./cost/@);
fi;
if [ -n "$VAR(./priority/@)" ]; then
- sudo brctl setportprio $newbridge $bondif $VAR(./priority/@);
+ /usr/sbin/brctl setportprio $newbridge $bondif $VAR(./priority/@);
fi
fi
elif [ ${COMMIT_ACTION} = 'DELETE' ]; then
@@ -33,7 +33,7 @@ end:
# it gets deleted before the removal of bridge-groups under interfaces
exit 0
else
- sudo brctl delif $oldbridge $bondif
+ /usr/sbin/brctl delif $oldbridge $bondif
fi
else
if [ -z "$newbridge" ]; then
@@ -47,15 +47,15 @@ end:
if ! /opt/vyatta/sbin/vyatta-bridgegroup-depedency.pl \
--bridge-notin-proposedcfg \
--bridge-interface="$oldbridge"; then \
- sudo brctl delif $oldbridge $bondif
+ /usr/sbin/brctl delif $oldbridge $bondif
fi
- sudo brctl addif $newbridge $bondif
+ /usr/sbin/brctl addif $newbridge $bondif
fi
if [ -n "$VAR(./cost/@)" ]; then
- sudo brctl setpathcost $newbridge $bondif $VAR(./cost/@)
+ /usr/sbin/brctl setpathcost $newbridge $bondif $VAR(./cost/@)
fi
if [ -n "$VAR(./priority/@)" ]; then
- sudo brctl setportprio $newbridge $bondif $VAR(./priority/@)
+ /usr/sbin/brctl setportprio $newbridge $bondif $VAR(./priority/@)
fi
fi
fi