diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2010-10-26 14:48:22 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2010-10-26 14:48:22 -0700 |
commit | 40461ef6ea9325b0dd1262cd3b99ffcbcf69dfd6 (patch) | |
tree | f1ef54222a2296bbed7103a2db1e44529e95d3a9 /templates | |
parent | 7dc4ac0cb122bc98f903f93fc83e93007de7c751 (diff) | |
parent | 3e0d01a69b7f70977375ab73a51cfc5004813065 (diff) | |
download | vyatta-cfg-quagga-40461ef6ea9325b0dd1262cd3b99ffcbcf69dfd6.tar.gz vyatta-cfg-quagga-40461ef6ea9325b0dd1262cd3b99ffcbcf69dfd6.zip |
Merge branch 'mendocino' of http://git.vyatta.com/vyatta-cfg-system into mendocino
Diffstat (limited to 'templates')
5 files changed, 23 insertions, 4 deletions
diff --git a/templates/interfaces/bonding/node.def b/templates/interfaces/bonding/node.def index 211140da..2346c490 100644 --- a/templates/interfaces/bonding/node.def +++ b/templates/interfaces/bonding/node.def @@ -9,9 +9,10 @@ syntax:expression: pattern $VAR(@) "^bond[0-9]+$" \ begin: if [ ! -f /sys/class/net/bonding_masters ]; then sudo modprobe bonding max_bonds=0 miimon=250 fi + create: sudo sh -c "echo +$VAR(@) > /sys/class/net/bonding_masters" || exit 1 - ip link set "$VAR(@)" up - /opt/vyatta/sbin/vyatta-link-detect $VAR(@) on + touch /tmp/bonding_$VAR(@).$PPID + delete: SLAVES=`cat /sys/class/net/$VAR(@)/bonding/slaves`; if [ -z "$SLAVES" ] then @@ -20,3 +21,9 @@ delete: SLAVES=`cat /sys/class/net/$VAR(@)/bonding/slaves`; echo "bonded interface $VAR(@) still has slaves: $SLAVES" exit 1; fi + +end: if [ -f /tmp/bonding_$VAR(@).$PPID ] + then rm -f /tmp/bonding_$VAR(@).$PPID + ip link set "$VAR(@)" up + /opt/vyatta/sbin/vyatta-link-detect $VAR(@) on + fi diff --git a/templates/interfaces/bonding/node.tag/arp-monitor/interval/node.def b/templates/interfaces/bonding/node.tag/arp-monitor/interval/node.def new file mode 100644 index 00000000..1b88797e --- /dev/null +++ b/templates/interfaces/bonding/node.tag/arp-monitor/interval/node.def @@ -0,0 +1,5 @@ +type: u32 +default: 0 +help: ARP link monitoring frequency in milliseconds + +update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../../@)/bonding/arp_interval" diff --git a/templates/interfaces/bonding/node.tag/arp-monitor/node.def b/templates/interfaces/bonding/node.tag/arp-monitor/node.def new file mode 100644 index 00000000..e1c392a7 --- /dev/null +++ b/templates/interfaces/bonding/node.tag/arp-monitor/node.def @@ -0,0 +1 @@ +help: ARP link monitoring parameters diff --git a/templates/interfaces/bonding/node.tag/arp-monitor/target/node.def b/templates/interfaces/bonding/node.tag/arp-monitor/target/node.def new file mode 100644 index 00000000..7dad4c4c --- /dev/null +++ b/templates/interfaces/bonding/node.tag/arp-monitor/target/node.def @@ -0,0 +1,7 @@ +multi: +type: ipv4 +help: IP address to use for ARP monitoring + +create: sudo sh -c "echo +$VAR(@) >/sys/class/net/$VAR(../../@)/bonding/arp_ip_target" + +delete: sudo sh -c "echo -$VAR(@) >/sys/class/net/$VAR(../../@)/bonding/arp_ip_target" diff --git a/templates/interfaces/bonding/node.tag/hash-policy/node.def b/templates/interfaces/bonding/node.tag/hash-policy/node.def index 54c2bb0f..842410d9 100644 --- a/templates/interfaces/bonding/node.tag/hash-policy/node.def +++ b/templates/interfaces/bonding/node.tag/hash-policy/node.def @@ -5,8 +5,7 @@ syntax:expression: $VAR(@) in "layer2", "layer2+3", "layer3+4" \ ; "hash_policy must be layer2 layer3+4 or layer2+3" help: Bonding transmit hash policy -update: sudo sh -c \ - "echo $VAR(@) >/sys/class/net/$VAR(../@)/bonding/xmit_hash_policy" +update: sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$VAR(../@) --hash=$VAR(@) val_help: layer2; use MAC addresses to generate the hash (802.3ad) val_help: layer2+3; combine MAC address and IP address to make hash |