summaryrefslogtreecommitdiff
path: root/templates/interfaces/pseudo-ethernet/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/pseudo-ethernet/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/pseudo-ethernet/node.def')
-rw-r--r--templates/interfaces/pseudo-ethernet/node.def6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/interfaces/pseudo-ethernet/node.def b/templates/interfaces/pseudo-ethernet/node.def
index 00e54055..14fe64aa 100644
--- a/templates/interfaces/pseudo-ethernet/node.def
+++ b/templates/interfaces/pseudo-ethernet/node.def
@@ -10,10 +10,10 @@ syntax:expression: pattern $VAR(@) "^peth[0-9]+$" \
commit:expression: $VAR(link) != ""
; "link device must be set for virtual ethernet $VAR(@)"
-create: ip link add $VAR(@) link $VAR(link/@) type macvlan mode $VAR(mode/@) || exit 1
+create: sudo ip link add $VAR(@) link $VAR(link/@) type macvlan mode $VAR(mode/@) || exit 1
if ! cli-shell-api exists interfaces ethernet $VAR(@) disable;
- then ip link set $VAR(@) up
+ then sudo ip link set $VAR(@) up
fi
/opt/vyatta/sbin/vyatta-link-detect $VAR(@) on
-delete: ip link delete dev $VAR(@) type macvlan
+delete: sudo ip link delete dev $VAR(@) type macvlan