diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-12-21 10:50:12 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-12-21 10:50:12 -0800 |
commit | 886e0e9ff9dd3e3fe73a37285b386cdffc653315 (patch) | |
tree | 15c9fc18a308205145c8837609cb7e4b5881eb08 /templates | |
parent | a08ee2271d2166fc8013cee8ebeddd9fb0987283 (diff) | |
download | vyatta-cfg-886e0e9ff9dd3e3fe73a37285b386cdffc653315.tar.gz vyatta-cfg-886e0e9ff9dd3e3fe73a37285b386cdffc653315.zip |
Move interfaces to vyatta-cfg-system package
All the other templates and scripts related to interfaces
are in vyatta-cfg-system
Diffstat (limited to 'templates')
21 files changed, 0 insertions, 249 deletions
diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def deleted file mode 100644 index a46ae72..0000000 --- a/templates/interfaces/ethernet/node.def +++ /dev/null @@ -1,11 +0,0 @@ -tag: -priority: 318 -type: txt -help: Set ethernet interface -syntax:expression: exec \ - "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=ethernet" -allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet -create: sudo ip link set "$VAR(@)" up - /opt/vyatta/sbin/vyatta-link-detect $VAR(@) on -delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 - sudo ip link set $VAR(@) down diff --git a/templates/interfaces/ethernet/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/address/node.def deleted file mode 100644 index db87ff0..0000000 --- a/templates/interfaces/ethernet/node.tag/address/node.def +++ /dev/null @@ -1,28 +0,0 @@ -multi: - -type: txt - -help: Set an IP address for this interface - -# Syntax check at "set" time. Give curent address value to script -# so that it can perform syntax check. -# -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../@)"\ - ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" - -# Syntax check at "commit" time. Pass all address values to script so that -# it can perform consistency check. -# -commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../@)" - -create:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@) - -delete:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@) - -allowed: echo "dhcp <>" - -comp_help:Possible completions: - <x.x.x.x/x> Set the IP address and prefix length - <h:h:h:h:h:h:h:h/x> Set the IPv6 address and prefix length - dhcp Set the IP address and prefix length via DHCP - diff --git a/templates/interfaces/ethernet/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/description/node.def deleted file mode 100644 index 7f64c78..0000000 --- a/templates/interfaces/ethernet/node.tag/description/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: txt -help: Set description for this interface -update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias" -delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias" diff --git a/templates/interfaces/ethernet/node.tag/disable-flow-control/node.def b/templates/interfaces/ethernet/node.tag/disable-flow-control/node.def deleted file mode 100644 index 10c6c06..0000000 --- a/templates/interfaces/ethernet/node.tag/disable-flow-control/node.def +++ /dev/null @@ -1,4 +0,0 @@ -help: Set to disable Ethernet flow control (pause frames) -create: sudo ethtool --pause $VAR(../@) autoneg off tx off rx off -delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 - sudo ethtool --pause $VAR(../@) autoneg on tx on rx on diff --git a/templates/interfaces/ethernet/node.tag/disable-link-detect/node.def b/templates/interfaces/ethernet/node.tag/disable-link-detect/node.def deleted file mode 100644 index 83858ec..0000000 --- a/templates/interfaces/ethernet/node.tag/disable-link-detect/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Set to ignore link state changes on this interface -update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../@) on -delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../@) off diff --git a/templates/interfaces/ethernet/node.tag/disable/node.def b/templates/interfaces/ethernet/node.tag/disable/node.def deleted file mode 100644 index fbfb155..0000000 --- a/templates/interfaces/ethernet/node.tag/disable/node.def +++ /dev/null @@ -1,12 +0,0 @@ -help: Set interface disabled -create: /etc/netplug/linkdown.d/dhclient $VAR(../@) - if ! sudo ip link set $VAR(../@) down 2>/dev/null; then - echo "Error disabling dev $VAR(../@)" - /etc/netplug/linkup.d/dhclient $VAR(../@) - exit 1 - fi -delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 - if ! sudo ip link set $VAR(../@) up; then - echo "Error enabling dev $VAR(../@)" - exit 1 - fi diff --git a/templates/interfaces/ethernet/node.tag/duplex/node.def b/templates/interfaces/ethernet/node.tag/duplex/node.def deleted file mode 100644 index 9277729..0000000 --- a/templates/interfaces/ethernet/node.tag/duplex/node.def +++ /dev/null @@ -1,13 +0,0 @@ -type: txt -help: Set the duplex mode for this interface -default: "auto" -syntax:expression: $VAR(@) in "auto", "half", "full"; "duplex must be auto, half or full" -commit:expression: ( $VAR(@) == "auto" && $VAR(../speed/@) == "auto" ) || \ - ( $VAR(@) != "auto" && $VAR(../speed/@) != "auto" ) ; \ - "if duplex is hardcoded, speed must also be hardcoded" -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) \ - --speed-duplex $VAR(../speed/@) $VAR(@) -comp_help:Possible completions: - auto\t\tAuto negotiation (default) - half\t\tHalf duplex - full\t\tFull duplex diff --git a/templates/interfaces/ethernet/node.tag/hw-id/node.def b/templates/interfaces/ethernet/node.tag/hw-id/node.def deleted file mode 100644 index 6c559f8..0000000 --- a/templates/interfaces/ethernet/node.tag/hw-id/node.def +++ /dev/null @@ -1,2 +0,0 @@ -type: macaddr -help: Set the Media Access Control (MAC) address of this interface diff --git a/templates/interfaces/ethernet/node.tag/mac/node.def b/templates/interfaces/ethernet/node.tag/mac/node.def deleted file mode 100644 index 55264cf..0000000 --- a/templates/interfaces/ethernet/node.tag/mac/node.def +++ /dev/null @@ -1,8 +0,0 @@ -type: macaddr -help: Set the Media Access Control (MAC) address of this interface -syntax:expression: exec "\ - /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --valid-mac $VAR(@)" -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --set-mac $VAR(@) -delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 - /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --set-mac $VAR(../hw-id/@) - diff --git a/templates/interfaces/ethernet/node.tag/mtu/node.def b/templates/interfaces/ethernet/node.tag/mtu/node.def deleted file mode 100644 index dc03ae1..0000000 --- a/templates/interfaces/ethernet/node.tag/mtu/node.def +++ /dev/null @@ -1,8 +0,0 @@ -type: u32 -help: Set the Maximum Transmission Unit (MTU) for this interface -syntax:expression: $VAR(@) >= 68 && $VAR(@) <= 9000; "MTU must be between 68 and 9000" -update: if ! sudo ip link set $VAR(../@) mtu $VAR(@) - then echo "Error setting MTU on dev $VAR(../@)"; exit 1 - fi -delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 - sudo ip link set $VAR(../@) mtu 1500 diff --git a/templates/interfaces/ethernet/node.tag/smp_affinity/node.def b/templates/interfaces/ethernet/node.tag/smp_affinity/node.def deleted file mode 100644 index a444ae9..0000000 --- a/templates/interfaces/ethernet/node.tag/smp_affinity/node.def +++ /dev/null @@ -1,45 +0,0 @@ -# -# -# Configuration template for interface.ethernet.name.smp_affinity -# -# Configure the CPUs that the associated interface will interrupt. -# SMP affinity is configured by a hexidecimal bitmask that specifies the -# CPUs that the system can interrupt. The SMP affinity bitmask must contain -# at least one bits, and may only contain as many bits as there are CPUs on -# the system. -# - -type: txt - -help: Set CPU interrupt affinity mask for this interface - -comp_help: Possible completions: - XX\tHexidecimal bitmask representing CPUs that this NIC will interrupt - auto\tSet affinity automatically - -default: "auto" - -syntax:expression: exec " \ - if [ $VAR(@) = auto ]; then \ - exit 0; - else \ - /opt/vyatta/sbin/vyatta-irqaffin check $VAR(../@) $VAR(@); \ - fi" - -update: - if [ "$VAR(@)" = "auto" ]; then - echo "Setting SMP affinity for $VAR(../@) automatically." - sudo /opt/vyatta/sbin/vyatta-auto-irqaffin.pl --setup $VAR(../@) - else - sudo /opt/vyatta/sbin/vyatta-irqaffin set $VAR(../@) $VAR(@) - if [ $? -ne 0 ]; then - echo "Error setting CPU affinity mask $VAR(@) on interface $VAR(../@)" - exit 1 - fi - fi - -delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 - if ! sudo /opt/vyatta/sbin/vyatta-irqaffin reset $VAR(../@); then - echo "Error deleting CPU affinity mask on interface $VAR(../@)" - exit 1 - fi diff --git a/templates/interfaces/ethernet/node.tag/speed/node.def b/templates/interfaces/ethernet/node.tag/speed/node.def deleted file mode 100644 index e822df9..0000000 --- a/templates/interfaces/ethernet/node.tag/speed/node.def +++ /dev/null @@ -1,16 +0,0 @@ -type: txt -help: Set the speed for this interface -default: "auto" -syntax:expression: $VAR(@) in "auto", "10", "100", "1000", "2500", "10000"; "Speed must be auto, 10, 100, 1000, 2500, or 10000" -commit:expression: ( $VAR(@) == "auto" && $VAR(../duplex/@) == "auto" ) || \ - ( $VAR(@) != "auto" && $VAR(../duplex/@) != "auto" ) ; \ - "if speed is hardcoded, duplex must also be hardcoded" -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) \ - --speed-duplex $VAR(@) $VAR(../duplex/@) -comp_help:Possible completions: - auto\t\tAuto negotiation (default) - 10 \t\t10 Mbit/sec - 100 \t\t100 Mbit/sec - 1000\t\t1 Gbit/sec - 2500\t\t2.5 Gbit/sec - 10000\t10 Gbit/sec diff --git a/templates/interfaces/ethernet/node.tag/vif/node.def b/templates/interfaces/ethernet/node.tag/vif/node.def deleted file mode 100644 index 610c0e5..0000000 --- a/templates/interfaces/ethernet/node.tag/vif/node.def +++ /dev/null @@ -1,18 +0,0 @@ -tag: -priority: 319 -type: u32 -help: Set Virtual Local Area Network (VLAN) ID -syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094" -create: if ! sudo ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan id $VAR(@) - then echo "Error creating VLAN device $VAR(../@).$VAR(@)" - exit 1 - fi - if /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) --isup - then - sudo ip link set "$VAR(../@).$VAR(@)" up - fi - /opt/vyatta/sbin/vyatta-link-detect "$VAR(../@).$VAR(@)" on -delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 - sudo ip link delete dev "$VAR(../@).$VAR(@)" type vlan id $VAR(@) -comp_help: possible completions: - <0-4094> Set VLAN ID 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 deleted file mode 100644 index a5edef6..0000000 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def +++ /dev/null @@ -1,27 +0,0 @@ -multi: - -type: txt - -help: Set an IP address for this interface - -# Syntax check at "set" time. Give curent address value to script -# so that it can perform syntax check. -# -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../../@).$VAR(../@) "\ - ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../../@).$VAR(../@)" - -# Syntax check at "commit" time. Pass all address values to script so that -# it can perform consistency check. -# -commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../../@).$VAR(../@)" - -create:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../../@).$VAR(../@) - -delete:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../../@).$VAR(../@) - -allowed: echo "dhcp <>" - -comp_help:Possible completions: - <x.x.x.x/x> Set the IP address and prefix length - <h:h:h:h:h:h:h:h/x> Set the IPv6 address and prefix length - dhcp Set the IP address and prefix length via DHCP diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def deleted file mode 100644 index 0ef5489..0000000 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: txt -help: Set description for this interface -update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias" -delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/disable-link-detect/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/disable-link-detect/node.def deleted file mode 100644 index 897113d..0000000 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/disable-link-detect/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Set to ignore link state changes on this interface -update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../@).$VAR(../@) on -delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../@).$VAR(../@) off diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/disable/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/disable/node.def deleted file mode 100644 index 78b2487..0000000 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/disable/node.def +++ /dev/null @@ -1,11 +0,0 @@ -help: Set interface disabled -update: /etc/netplug/linkdown.d/dhclient $VAR(../../@).$VAR(../@) - if ! sudo ip link set $VAR(../../@).$VAR(../@) down 2>/dev/null; then - echo "Error disabling dev $VAR(../../@).$VAR(../@)" - /etc/netplug/linkup.d/dhclient $VAR(../../@).$VAR(../@) - exit 1 - fi -delete: if ! sudo ip link set $VAR(../../@).$VAR(../@) up; then - echo "Error enabling dev $VAR(../../@).$VAR(../@)" - exit 1 - fi diff --git a/templates/interfaces/loopback/node.def b/templates/interfaces/loopback/node.def deleted file mode 100644 index 64485e5..0000000 --- a/templates/interfaces/loopback/node.def +++ /dev/null @@ -1,8 +0,0 @@ -tag: -priority: 320 -type: txt -help: Set loopback interface -syntax:expression: exec \ - "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=loopback" -allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=loopback -create: sudo ip link set $VAR(@) up diff --git a/templates/interfaces/loopback/node.tag/address/node.def b/templates/interfaces/loopback/node.tag/address/node.def deleted file mode 100644 index 76c2e76..0000000 --- a/templates/interfaces/loopback/node.tag/address/node.def +++ /dev/null @@ -1,18 +0,0 @@ -multi: - -type: txt - -help: Set an IP address for this interface - -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../@)"; \ - "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" - -create:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@)"; \ - "Error setting address $VAR(@) on interface $VAR(../@)" - -delete:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@)"; \ - "Error deleting address $VAR(@) on interface $VAR(../@)" - -comp_help:Possible completions: - <x.x.x.x/x> Set the IP address and prefix length - <h:h:h:h:h:h:h:h/x> Set the IPv6 address and prefix length diff --git a/templates/interfaces/loopback/node.tag/description/node.def b/templates/interfaces/loopback/node.tag/description/node.def deleted file mode 100644 index 7f64c78..0000000 --- a/templates/interfaces/loopback/node.tag/description/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: txt -help: Set description for this interface -update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias" -delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias" diff --git a/templates/interfaces/node.def b/templates/interfaces/node.def deleted file mode 100644 index 286b878..0000000 --- a/templates/interfaces/node.def +++ /dev/null @@ -1,2 +0,0 @@ -priority: 850 -help: Configure network interfaces |