diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-10-24 10:05:08 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-10-24 10:05:08 -0700 |
commit | d9349ca1d70d49ead870decdfafaefc21abd2a42 (patch) | |
tree | 76592b4206c028f6337fc4cd769b689027dfabe0 /templates | |
parent | ae08adfabeed8fec9093e759a40f156d589defa9 (diff) | |
download | vyatta-cfg-d9349ca1d70d49ead870decdfafaefc21abd2a42.tar.gz vyatta-cfg-d9349ca1d70d49ead870decdfafaefc21abd2a42.zip |
add 'sudo' to 'interfaces' configuration commands.
Diffstat (limited to 'templates')
11 files changed, 22 insertions, 22 deletions
diff --git a/templates/interfaces/ethernet/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/address/node.def index 41a0b06..37fa224 100644 --- a/templates/interfaces/ethernet/node.tag/address/node.def +++ b/templates/interfaces/ethernet/node.tag/address/node.def @@ -1,5 +1,5 @@ multi: type: ipv4net help: "Set IPv4 address and prefix for this interface" -create: "ip addr add $(@) dev $(../@)"; "error setting address $(@) on dev $(../@)" -delete: "ip addr del $(@) dev $(../@)"; "error deleting address $(@) on dev $(../@)" +update: "sudo ip addr add $(@) dev $(../@)"; "error setting address $(@) on dev $(../@)" +delete: "sudo ip addr del $(@) dev $(../@)"; "error deleting address $(@) on dev $(../@)" diff --git a/templates/interfaces/ethernet/node.tag/duplex/node.def b/templates/interfaces/ethernet/node.tag/duplex/node.def index e15ef39..70df798 100644 --- a/templates/interfaces/ethernet/node.tag/duplex/node.def +++ b/templates/interfaces/ethernet/node.tag/duplex/node.def @@ -2,5 +2,5 @@ type: txt help: "set the duplex for this interface" syntax: $(@) in "half", "full"; "duplex must be half or full" commit: $(../speed) != ""; "if duplex is hardcoded, speed must also be hardcoded" -create: "ethtool -s $(../@) speed $(../speed/@) duplex $(@) autoneg off" -delete: "ethtool -s $(../@) autoneg on" +update: "sudo ethtool -s $(../@) speed $(../speed/@) duplex $(@) autoneg off" +delete: "sudo ethtool -s $(../@) autoneg on" diff --git a/templates/interfaces/ethernet/node.tag/enable/node.def b/templates/interfaces/ethernet/node.tag/enable/node.def index 2b74d58..63ff5dd 100644 --- a/templates/interfaces/ethernet/node.tag/enable/node.def +++ b/templates/interfaces/ethernet/node.tag/enable/node.def @@ -1,3 +1,3 @@ help: "enable interface" -create: "ip link set $(../@) up"; "error enabling dev $(../@)" -delete: "ip link set $(../@) down"; "error disabling dev $(../@)" +update: "sudo ip link set $(../@) up"; "error enabling dev $(../@)" +delete: "sudo ip link set $(../@) down"; "error disabling dev $(../@)" diff --git a/templates/interfaces/ethernet/node.tag/mac/node.def b/templates/interfaces/ethernet/node.tag/mac/node.def index 41e4313..284c447 100644 --- a/templates/interfaces/ethernet/node.tag/mac/node.def +++ b/templates/interfaces/ethernet/node.tag/mac/node.def @@ -1,4 +1,4 @@ type: macaddr help: "set the MAC address for this interface" -create: "ip link set $(../@) address $(@)"; "error setting MAC address on dev $(../@)" -delete: "ip link set $(../@) address $(../hw-id/@)"; "error setting MAC address on dev $(../@) to $(../hw-id/@)" +update: "sudo ip link set $(../@) address $(@)"; "error setting MAC address on dev $(../@)" +delete: "sudo ip link set $(../@) address $(../hw-id/@)"; "error setting MAC address on dev $(../@) to $(../hw-id/@)" diff --git a/templates/interfaces/ethernet/node.tag/mtu/node.def b/templates/interfaces/ethernet/node.tag/mtu/node.def index 33b1238..4ab7b57 100644 --- a/templates/interfaces/ethernet/node.tag/mtu/node.def +++ b/templates/interfaces/ethernet/node.tag/mtu/node.def @@ -1,5 +1,5 @@ type: u32 help: "set the MTU address for this interface" syntax: $(@) >= 1 && $(@) <= 1500; "MTU must be between 1 and 1500" -create: "ip link set $(../@) mtu $(@)"; "error setting MAC address on dev $(../@)" -delete: "ip link set $(../@) mtu 1500"; "error deleteing MAC address on dev $(../@)" +update: "sudo ip link set $(../@) mtu $(@)"; "error setting MAC address on dev $(../@)" +delete: "sudo ip link set $(../@) mtu 1500"; "error deleteing MAC address on dev $(../@)" diff --git a/templates/interfaces/ethernet/node.tag/speed/node.def b/templates/interfaces/ethernet/node.tag/speed/node.def index 6983355..a986490 100644 --- a/templates/interfaces/ethernet/node.tag/speed/node.def +++ b/templates/interfaces/ethernet/node.tag/speed/node.def @@ -2,5 +2,5 @@ type: txt help: "set the speed for this interface" syntax: $(@) in "10", "100", "1000"; "Speed must be 10, 100, or 1000" commit: $(../duplex/@) != ""; "if speed is hardcoded, duplex must also be hardcoded" -create: "ethtool -s $(../@) speed $(@) duplex $(../duplex/@) autoneg off" -delete: "ethtool -s $(../@) autoneg on" +update: "sudo ethtool -s $(../@) speed $(@) duplex $(../duplex/@) autoneg off" +delete: "sudo ethtool -s $(../@) autoneg on" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.def b/templates/interfaces/ethernet/node.tag/vif/node.def index 612eb11..753f41b 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.def @@ -2,6 +2,6 @@ tag: type: u32 help: "vlan ID" syntax: $(@) >= 0 && $(@) <= 4095; "vlan ID must be between 0 and 4095" -create: "modprobe 8021q"; "error loading 802.1q driver" -create: "vconfig add $(../@) $(@)"; "error adding vlan id $(@) to dev $(../@)" -delete: "vconfig rem $(../@).$(@)"; "error removing vlan id $(@) from dev $(../@)" +update: "sudo modprobe 8021q"; "error loading 802.1q driver" +update: "sudo vconfig add $(../@) $(@)"; "error adding vlan id $(@) to dev $(../@)" +delete: "sudo vconfig rem $(../@).$(@)"; "error removing vlan id $(@) from dev $(../@)" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def index 345a29e..af01547 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def @@ -1,5 +1,5 @@ multi: type: ipv4net help: "Set IPv4 address and prefix for this interface" -create: "ip addr add $(@) dev $(../../@)"; "error setting address $(@) on dev $(../../@)" -delete: "ip addr del $(@) dev $(../../@)"; "error deleteing address $(@) on dev $(../../@)" +update: "sudo ip addr add $(@) dev $(../../@)"; "error setting address $(@) on dev $(../../@)" +delete: "sudo ip addr del $(@) dev $(../../@)"; "error deleteing address $(@) on dev $(../../@)" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/enable/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/enable/node.def index 1e1879f..0309578 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/enable/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/enable/node.def @@ -1,3 +1,3 @@ help: "enable interface" -create: "ip link set $(../../@) up"; "error enabling dev $(../../@)" -delete: "ip link set $(../../@) down"; "error disabling dev $(../../@)" +update: "sudo ip link set $(../../@) up"; "error enabling dev $(../../@)" +delete: "sudo ip link set $(../../@) down"; "error disabling dev $(../../@)" diff --git a/templates/interfaces/loopback/node.def b/templates/interfaces/loopback/node.def index 328a192..d6e3a81 100644 --- a/templates/interfaces/loopback/node.def +++ b/templates/interfaces/loopback/node.def @@ -6,4 +6,4 @@ syntax: exec " \ echo loopback interface $(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " -update: "ip link set $(@) up" +update: "sudo ip link set $(@) up" diff --git a/templates/interfaces/loopback/node.tag/address/node.def b/templates/interfaces/loopback/node.tag/address/node.def index 2e7e106..cdef75c 100644 --- a/templates/interfaces/loopback/node.tag/address/node.def +++ b/templates/interfaces/loopback/node.tag/address/node.def @@ -2,5 +2,5 @@ multi: type: ipv4net help: "Set IPv4 address and prefix for this interface" # TODO make sure 127.0.0.0/8 not in here. -create: "ip addr add $(@) dev $(../@)"; "error setting address $(@) on dev $(../@)" -delete: "ip addr del $(@) dev $(../@)"; "error deleteing address $(@) on dev $(../@)" +update: "sudo ip addr add $(@) dev $(../@)"; "error setting address $(@) on dev $(../@)" +delete: "sudo ip addr del $(@) dev $(../@)"; "error deleteing address $(@) on dev $(../@)" |