summaryrefslogtreecommitdiff
path: root/templates/interfaces/bridge/node.def
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-08-25 20:19:04 +0200
committerDaniil Baturin <daniil@baturin.org>2018-08-25 20:19:04 +0200
commit7f5df3ea03fe410f781478aeffc201537756b040 (patch)
treedfcf9ac77e832e1bc68ea7f8aeb50fbea092dcec /templates/interfaces/bridge/node.def
parentff172c743e5d732cad083c075c79485849913b4d (diff)
downloadvyatta-cfg-system-7f5df3ea03fe410f781478aeffc201537756b040.tar.gz
vyatta-cfg-system-7f5df3ea03fe410f781478aeffc201537756b040.zip
T797: add sudo to ip command calls in other interface types.
Diffstat (limited to 'templates/interfaces/bridge/node.def')
-rw-r--r--templates/interfaces/bridge/node.def8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/interfaces/bridge/node.def b/templates/interfaces/bridge/node.def
index 8525cb9e..b6654f07 100644
--- a/templates/interfaces/bridge/node.def
+++ b/templates/interfaces/bridge/node.def
@@ -7,14 +7,14 @@ syntax:expression: pattern $VAR(@) "^br[0-9]+$" ; "Must be (br0 - br999)"
create: /sbin/brctl addbr $VAR(@)
if [ -n "$VAR(mac/@)" ] ; then
- ip li set dev $VAR(@) address $VAR(mac/@)
+ sudo ip li set dev $VAR(@) address $VAR(mac/@)
fi
- ip link set $VAR(@) up
+ sudo ip link set $VAR(@) up
delete: if ! /opt/vyatta/sbin/vyatta-bridgegroup-depedency.pl \
--no-interfaces-assigned \
--bridge-interface="$VAR(@)"; then \
exit 1
fi
- ip link set $VAR(@) down;
- /sbin/brctl delbr $VAR(@);
+ sudo ip link set $VAR(@) down;
+ sudo /sbin/brctl delbr $VAR(@);