diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-08-25 20:19:04 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-08-25 20:19:04 +0200 |
commit | 7f5df3ea03fe410f781478aeffc201537756b040 (patch) | |
tree | dfcf9ac77e832e1bc68ea7f8aeb50fbea092dcec /templates/interfaces/l2tpv3 | |
parent | ff172c743e5d732cad083c075c79485849913b4d (diff) | |
download | vyatta-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/l2tpv3')
-rw-r--r-- | templates/interfaces/l2tpv3/node.def | 12 | ||||
-rw-r--r-- | templates/interfaces/l2tpv3/node.tag/disable/node.def | 4 | ||||
-rw-r--r-- | templates/interfaces/l2tpv3/node.tag/mtu/node.def | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/templates/interfaces/l2tpv3/node.def b/templates/interfaces/l2tpv3/node.def index 973256bf..6a1109b2 100644 --- a/templates/interfaces/l2tpv3/node.def +++ b/templates/interfaces/l2tpv3/node.def @@ -33,24 +33,24 @@ begin: fi create: - ip l2tp add tunnel tunnel_id $VAR(./tunnel-id/@) \ + sudo ip l2tp add tunnel tunnel_id $VAR(./tunnel-id/@) \ peer_tunnel_id $VAR(./peer-tunnel-id/@) \ udp_sport $VAR(./source-port/@) \ udp_dport $VAR(./destination-port/@) \ encap $VAR(./encapsulation/@) \ local $VAR(./local-ip/@) \ remote $VAR(./remote-ip/@) - ip l2tp add session session_id $VAR(./session-id/@) \ + sudo ip l2tp add session session_id $VAR(./session-id/@) \ tunnel_id $VAR(./tunnel-id/@) \ peer_session_id $VAR(./peer-session-id/@) \ name $VAR(@) - ip link set $VAR(@) up + sudo ip link set $VAR(@) up delete: - ip link set $VAR(@) down + sudo ip link set $VAR(@) down if [ -n "$VAR(./tunnel-id/@)" ] && [ -n "$VAR(./session-id/@)" ] ; then - ip l2tp del session tunnel_id $VAR(./tunnel-id/@) session_id $VAR(./session-id/@) + sudo ip l2tp del session tunnel_id $VAR(./tunnel-id/@) session_id $VAR(./session-id/@) fi if [ -n "$VAR(./tunnel-id/@)" ] ; then - ip l2tp del tunnel tunnel_id $VAR(./tunnel-id/@) + sudo ip l2tp del tunnel tunnel_id $VAR(./tunnel-id/@) fi diff --git a/templates/interfaces/l2tpv3/node.tag/disable/node.def b/templates/interfaces/l2tpv3/node.tag/disable/node.def index 26199646..8c580c95 100644 --- a/templates/interfaces/l2tpv3/node.tag/disable/node.def +++ b/templates/interfaces/l2tpv3/node.tag/disable/node.def @@ -1,4 +1,4 @@ help: Disable interface -update: ip link set $VAR(../@) down +update: sudo ip link set $VAR(../@) down -delete: ip link set $VAR(../@) up +delete: sudo ip link set $VAR(../@) up diff --git a/templates/interfaces/l2tpv3/node.tag/mtu/node.def b/templates/interfaces/l2tpv3/node.tag/mtu/node.def index 2190d183..71d2a12f 100644 --- a/templates/interfaces/l2tpv3/node.tag/mtu/node.def +++ b/templates/interfaces/l2tpv3/node.tag/mtu/node.def @@ -6,9 +6,9 @@ val_help: u32:68-9000; Maximum Transmission Unit (MTU) update: if [ -d /sys/class/net/$VAR(../@) ] ; then - ip link set $VAR(../@) mtu $VAR(@) + sudo ip link set $VAR(../@) mtu $VAR(@) fi delete: if [ -d /sys/class/net/$VAR(../@) ] ; then - ip link set $VAR(../@) mtu 1488 + sudo ip link set $VAR(../@) mtu 1488 fi |