diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-04 09:25:02 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-04 16:30:02 +0200 |
commit | 47c784c1eea80d322e5f0dfa0b7906616e61e702 (patch) | |
tree | 08e44c08bd0c8245b31272427920fd02f3e17b05 /templates/interfaces/bonding | |
parent | 3309122cfeb89396ac40f0a46948f87614b74781 (diff) | |
download | vyatta-cfg-system-47c784c1eea80d322e5f0dfa0b7906616e61e702.tar.gz vyatta-cfg-system-47c784c1eea80d322e5f0dfa0b7906616e61e702.zip |
bonding: T1614: remove old style node.def files in favour of XML/Python rewrite
Diffstat (limited to 'templates/interfaces/bonding')
62 files changed, 0 insertions, 649 deletions
diff --git a/templates/interfaces/bonding/node.def b/templates/interfaces/bonding/node.def deleted file mode 100644 index 1fa270b4..00000000 --- a/templates/interfaces/bonding/node.def +++ /dev/null @@ -1,35 +0,0 @@ -tag: -priority: 315 -type: txt -help: Bonding interface name -val_help: <bondN>; Bonding interface name -syntax:expression: pattern $VAR(@) "^bond[0-9]+$" \ - ; "bonding must be (bond0-bond99)" - -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 - touch /tmp/bonding_$VAR(@).$PPID - -delete: SLAVES=`cat /sys/class/net/$VAR(@)/bonding/slaves`; - if [ -z "$SLAVES" ] - then - sudo sh -c "echo -$VAR(@) > /sys/class/net/bonding_masters" - else - echo "bonded interface $VAR(@) still has slaves: $SLAVES" - exit 1; - fi - -end: `/bin/cli-shell-api exists interfaces bonding $VAR(@) disable` - if [ $? -ne 0 ] - then - if [ -f /tmp/bonding_$VAR(@).$PPID ] - then rm -f /tmp/bonding_$VAR(@).$PPID - sudo ip link set "$VAR(@)" up - /opt/vyatta/sbin/vyatta-link-detect $VAR(@) on - fi - else - sudo ip link set "$VAR(@)" down - fi diff --git a/templates/interfaces/bonding/node.tag/address/node.def b/templates/interfaces/bonding/node.tag/address/node.def deleted file mode 100644 index 2789d865..00000000 --- a/templates/interfaces/bonding/node.tag/address/node.def +++ /dev/null @@ -1,18 +0,0 @@ -multi: -priority: 320 # after ether device bonding groups -type: txt -help: IP address - -syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" - -commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../@)" - -create: sudo /opt/vyatta/sbin/vyatta-address add $VAR(../@) $VAR(@) - -delete: sudo /opt/vyatta/sbin/vyatta-address delete $VAR(../@) $VAR(@) - -allowed: echo "dhcp <>" -val_help: ipv4net; IP address and prefix length -val_help: ipv6net; IPv6 address and prefix length -val_help: dhcp; Dynamic Host Configuration Protocol -val_help: dhcpv6; Dynamic Host Configuration Protocol for IPv6 diff --git a/templates/interfaces/bonding/node.tag/arp-monitor/interval/node.def b/templates/interfaces/bonding/node.tag/arp-monitor/interval/node.def deleted file mode 100644 index 010a953b..00000000 --- a/templates/interfaces/bonding/node.tag/arp-monitor/interval/node.def +++ /dev/null @@ -1,7 +0,0 @@ -type: u32 -default: 0 -help: ARP link monitoring frequency in milliseconds - -update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../../@)/bonding/arp_interval" -delete: sudo sh -c 'echo 0 > /sys/class/net/$VAR(../../@)/bonding/arp_interval' - sudo sh -c 'echo 250 > /sys/class/net/$VAR(../../@)/bonding/miimon' diff --git a/templates/interfaces/bonding/node.tag/arp-monitor/node.def b/templates/interfaces/bonding/node.tag/arp-monitor/node.def deleted file mode 100644 index e1c392a7..00000000 --- a/templates/interfaces/bonding/node.tag/arp-monitor/node.def +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 7dad4c4c..00000000 --- a/templates/interfaces/bonding/node.tag/arp-monitor/target/node.def +++ /dev/null @@ -1,7 +0,0 @@ -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/description/node.def b/templates/interfaces/bonding/node.tag/description/node.def deleted file mode 100644 index c6d2789d..00000000 --- a/templates/interfaces/bonding/node.tag/description/node.def +++ /dev/null @@ -1,8 +0,0 @@ -type: txt -help: Description - -syntax:expression: pattern $VAR(@) "^.{1,256}$" \ - ; "interface description is too long (limit 256 characters)" - -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/bonding/node.tag/dhcp-options/client-id/node.def b/templates/interfaces/bonding/node.tag/dhcp-options/client-id/node.def deleted file mode 100644 index 85ebe6e3..00000000 --- a/templates/interfaces/bonding/node.tag/dhcp-options/client-id/node.def +++ /dev/null @@ -1,2 +0,0 @@ -type: txt -help: DHCP client identifier diff --git a/templates/interfaces/bonding/node.tag/dhcp-options/host-name/node.def b/templates/interfaces/bonding/node.tag/dhcp-options/host-name/node.def deleted file mode 100644 index 80d28fbd..00000000 --- a/templates/interfaces/bonding/node.tag/dhcp-options/host-name/node.def +++ /dev/null @@ -1,2 +0,0 @@ -type: txt -help: DHCP client host name (overrides the system host name) diff --git a/templates/interfaces/bonding/node.tag/dhcp-options/node.def b/templates/interfaces/bonding/node.tag/dhcp-options/node.def deleted file mode 100644 index e90406df..00000000 --- a/templates/interfaces/bonding/node.tag/dhcp-options/node.def +++ /dev/null @@ -1 +0,0 @@ -help: DHCP options diff --git a/templates/interfaces/bonding/node.tag/dhcpv6-options/node.def b/templates/interfaces/bonding/node.tag/dhcpv6-options/node.def deleted file mode 100644 index d25533f9..00000000 --- a/templates/interfaces/bonding/node.tag/dhcpv6-options/node.def +++ /dev/null @@ -1,52 +0,0 @@ -# This node is run before the rest of the interface is configured. -# We first check to see if DHCPv6 is still configured on the interface by -# looking over at the interface address parameters. Then we check to see -# if the DHCPv6 client program is still running on this interface. If both -# of those are true, then any change to this tree means that the user -# has changed this tree ONLY, and that we are going to have to re-start -# the DHCPv6 client using the new parameters. - - -priority: 319 # Run before interface has been configured - -help: DHCPv6 options - -end: - ifname="$VAR(../@)" - echo "dhcpv6-options: ifname is $ifname" - - dhcpv6_set=0 - for param in $VAR(../address/@@); do - if [ "$param" = "dhcpv6" ]; then - dhcpv6_set=1 - fi - done - - if [ $dhcpv6_set -eq 0 ]; then - echo "DHCPv6 is not configured on this interface" - exit 0 - fi - - conffile=/var/lib/dhcp/dhclient_v6_$VAR(../@).conf - if [ ! -e $conffile ]; then - echo "Conf file $conffile doesn't exist" - exit 0 - fi - - if [ -n "$VAR(./parameters-only)" ]; then - arg1="--parameters-only" - fi - - if [ -n "$VAR(./temporary)" ]; then - arg2="--temporary" - fi - - echo "Re-starting DHCPv6 client on ${ifname}..." - sudo /opt/vyatta/sbin/vyatta-dhcpv6-client.pl --stop --start \ - --ifname $ifname $arg1 $arg2 - if [ $? != 0 ]; then - exit 1 - fi - - echo "Done." - exit 0 diff --git a/templates/interfaces/bonding/node.tag/dhcpv6-options/parameters-only/node.def b/templates/interfaces/bonding/node.tag/dhcpv6-options/parameters-only/node.def deleted file mode 100644 index 0e407f81..00000000 --- a/templates/interfaces/bonding/node.tag/dhcpv6-options/parameters-only/node.def +++ /dev/null @@ -1,3 +0,0 @@ - -help: Acquire only config parameters, not address - diff --git a/templates/interfaces/bonding/node.tag/dhcpv6-options/temporary/node.def b/templates/interfaces/bonding/node.tag/dhcpv6-options/temporary/node.def deleted file mode 100644 index a850ef4b..00000000 --- a/templates/interfaces/bonding/node.tag/dhcpv6-options/temporary/node.def +++ /dev/null @@ -1,3 +0,0 @@ - -help: IPv6 "temporary" address - diff --git a/templates/interfaces/bonding/node.tag/disable-link-detect/node.def b/templates/interfaces/bonding/node.tag/disable-link-detect/node.def deleted file mode 100644 index 7129ff33..00000000 --- a/templates/interfaces/bonding/node.tag/disable-link-detect/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Ignore link state changes -update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../@) on -delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../@) off diff --git a/templates/interfaces/bonding/node.tag/disable/node.def b/templates/interfaces/bonding/node.tag/disable/node.def deleted file mode 100644 index c4a4c681..00000000 --- a/templates/interfaces/bonding/node.tag/disable/node.def +++ /dev/null @@ -1,11 +0,0 @@ -help: Disable interface -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: if ! sudo ip link set $VAR(../@) up; then - echo "Error enabling dev $VAR(../@)" - exit 1 - fi diff --git a/templates/interfaces/bonding/node.tag/hash-policy/node.def b/templates/interfaces/bonding/node.tag/hash-policy/node.def deleted file mode 100644 index 81fb2901..00000000 --- a/templates/interfaces/bonding/node.tag/hash-policy/node.def +++ /dev/null @@ -1,12 +0,0 @@ -type: txt -default: "layer2" -allowed: echo "layer2 layer2+3 layer3+4" -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 ${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 -val_help: layer3+4; combine IP address and port to make hash diff --git a/templates/interfaces/bonding/node.tag/ip/arp-cache-timeout/node.def b/templates/interfaces/bonding/node.tag/ip/arp-cache-timeout/node.def deleted file mode 100644 index 4441914c..00000000 --- a/templates/interfaces/bonding/node.tag/ip/arp-cache-timeout/node.def +++ /dev/null @@ -1,9 +0,0 @@ -help: ARP cache entry timeout in seconds - -type: u32 - -create:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" " - -update:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" " - -delete:expression: "sudo sh -c \"echo 30000 > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" " diff --git a/templates/interfaces/bonding/node.tag/ip/enable-proxy-arp/node.def b/templates/interfaces/bonding/node.tag/ip/enable-proxy-arp/node.def deleted file mode 100644 index ae7ba09a..00000000 --- a/templates/interfaces/bonding/node.tag/ip/enable-proxy-arp/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Enable proxy-arp on this interface -create:expression: "sudo sh -c \"echo 1 > /proc/sys/net/ipv4/conf/$VAR(../../@)/proxy_arp\" " -delete:expression: "sudo sh -c \"echo 0 > /proc/sys/net/ipv4/conf/$VAR(../../@)/proxy_arp\" " diff --git a/templates/interfaces/bonding/node.tag/ip/proxy-arp-pvlan/node.def b/templates/interfaces/bonding/node.tag/ip/proxy-arp-pvlan/node.def deleted file mode 100644 index a6cf9494..00000000 --- a/templates/interfaces/bonding/node.tag/ip/proxy-arp-pvlan/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Enable private VLAN proxy ARP on this interface -create:expression: "sudo sh -c \"echo 1 > /proc/sys/net/ipv4/conf/$VAR(../../@)/proxy_arp_pvlan\" " -delete:expression: "sudo sh -c \"echo 0 > /proc/sys/net/ipv4/conf/$VAR(../../@)/proxy_arp_pvlan\" " diff --git a/templates/interfaces/bonding/node.tag/mac/node.def b/templates/interfaces/bonding/node.tag/mac/node.def deleted file mode 100644 index c315af71..00000000 --- a/templates/interfaces/bonding/node.tag/mac/node.def +++ /dev/null @@ -1,6 +0,0 @@ -type: macaddr -help: Media Access Control (MAC) address -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 does nothing since there is no hardware original value diff --git a/templates/interfaces/bonding/node.tag/mode/node.def b/templates/interfaces/bonding/node.tag/mode/node.def deleted file mode 100644 index a21d2961..00000000 --- a/templates/interfaces/bonding/node.tag/mode/node.def +++ /dev/null @@ -1,19 +0,0 @@ -type: txt -default: "802.3ad" -allowed: echo 802.3ad active-backup broadcast round-robin \ - transmit-load-balance adaptive-load-balance xor-hash -syntax:expression: $VAR(@) in \ - "802.3ad", "active-backup", "broadcast", "round-robin", \ - "transmit-load-balance", "adaptive-load-balance", "xor-hash" ; \ - "mode must be 802.3ad, active-backup, broadcast, round-robin, \ -transmit-load-balance, adaptive-load-balance, or xor" -help: Bonding mode -update: sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$VAR(../@) --mode=$VAR(@) - -val_help: 802.3ad; IEEE 802.3ad Dynamic link aggregation (Default) -val_help: active-backup; Fault tolerant: only one slave in the bond is active -val_help: broadcast; Fault tolerant: transmits everything on all slave interfaces -val_help: round-robin; Load balance: transmit packets in sequential order -val_help: transmit-load-balance; Load balance: adapts based on transmit load and speed -val_help: adaptive-load-balance; Load balance: adapts based on transmit and receive plus ARP -val_help: xor-hash; Load balance: distribute based on MAC address diff --git a/templates/interfaces/bonding/node.tag/mtu/node.def b/templates/interfaces/bonding/node.tag/mtu/node.def deleted file mode 100644 index 71347c58..00000000 --- a/templates/interfaces/bonding/node.tag/mtu/node.def +++ /dev/null @@ -1,7 +0,0 @@ -type: u32 -priority: 381 -help: Maximum Transmission Unit (MTU) -syntax:expression: $VAR(@) >= 68 && $VAR(@) <= 9000; "MTU must be between 68 and 9000" -val_help: u32:68-9000; Maximum Transmission Unit -update: sudo ip link set $VAR(../@) mtu $VAR(@) -delete: sudo ip link set $VAR(../@) mtu 1500 diff --git a/templates/interfaces/bonding/node.tag/primary/node.def b/templates/interfaces/bonding/node.tag/primary/node.def deleted file mode 100644 index 98a18a48..00000000 --- a/templates/interfaces/bonding/node.tag/primary/node.def +++ /dev/null @@ -1,10 +0,0 @@ -type: txt -priority: 320 # must be after ethernet bond-group -commit:expression: exec \ - "grep -s $VAR(@) /sys/class/net/$VAR(../@)/bonding/slaves" \ - ; "Ethernet interface must be part of the bonding group" -commit:expression: exec \ - "grep -E '(^active-backup|^balance-tlb|^balance-alb)' /sys/class/net/$VAR(../@)/bonding/mode" \ - ; "Bonding must have mode active-backup, transmit-load-balance or adaptive-load-balance" -update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/bonding/primary" -help: Primary device interface diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.def deleted file mode 100644 index 2c483317..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.def +++ /dev/null @@ -1,26 +0,0 @@ -tag: -priority: 320 -type: u32 -help: QinQ TAG-S Virtual Local Area Network (VLAN) ID -syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094" -val_help: u32:0-4094; VLAN ID - -create: ETHERTYPE=`echo "$VAR(ethertype/@)"` - if [ $ETHERTYPE == "0x88A8" ]; then ETHTYPE=802.1ad; fi - if [ $ETHERTYPE == "0x8100" ]; then ETHTYPE=802.1Q; fi - - if ! sudo ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan proto $ETHTYPE id $VAR(@) - then echo "Error creating VLAN device $VAR(../@).$VAR(@)" - exit 1 - fi - # if parent is up, then bring VLAN up - if [ $(( $(cat /sys/class/net/$VAR(../@)/flags) & 1 )) -eq 1 ] - then sudo ip link set "$VAR(../@).$VAR(@)" up - fi - /opt/vyatta/sbin/vyatta-link-detect "$VAR(../@).$VAR(@)" on - -delete: ETHERTYPE=`echo "$VAR(ethertype/@)"` - if [ $ETHERTYPE == "0x88A8" ]; then ETHTYPE=802.1ad; fi - if [ $ETHERTYPE == "0x8100" ]; then ETHTYPE=802.1Q; fi - [ -d /sys/class/net/$VAR(../@).$VAR(@) ] || exit 0 - sudo ip link delete dev "$VAR(../@).$VAR(@)" type vlan proto $ETHTYPE id $VAR(@) diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/address/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/address/node.def deleted file mode 100644 index f025dece..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/address/node.def +++ /dev/null @@ -1,17 +0,0 @@ -multi: -type: txt -help: IP address - -syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" - -commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../../@).$VAR(../@)" - -create: sudo /opt/vyatta/sbin/vyatta-address add $VAR(../../@).$VAR(../@) $VAR(@) - -delete: sudo /opt/vyatta/sbin/vyatta-address delete $VAR(../../@).$VAR(../@) $VAR(@) - -allowed: echo "dhcp <>" -val_help: ipv4net; IP address and prefix length -val_help: ipv6net; IPv6 address and prefix length -val_help: dhcp; Dynamic Host Configuration Protocol -val_help: dhcpv6; Dynamic Host Configuration Protocol for IPv6 diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/description/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/description/node.def deleted file mode 100644 index a0b29f05..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/description/node.def +++ /dev/null @@ -1,8 +0,0 @@ -type: txt -help: Description - -syntax:expression: pattern $VAR(@) "^.{1,256}$" \ - ; "interface description is too long (limit 256 characters)" - -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/bonding/node.tag/vif-s/node.tag/dhcp-options/client-id/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcp-options/client-id/node.def deleted file mode 100644 index 85ebe6e3..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcp-options/client-id/node.def +++ /dev/null @@ -1,2 +0,0 @@ -type: txt -help: DHCP client identifier diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcp-options/host-name/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcp-options/host-name/node.def deleted file mode 100644 index 80d28fbd..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcp-options/host-name/node.def +++ /dev/null @@ -1,2 +0,0 @@ -type: txt -help: DHCP client host name (overrides the system host name) diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcp-options/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcp-options/node.def deleted file mode 100644 index e90406df..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcp-options/node.def +++ /dev/null @@ -1 +0,0 @@ -help: DHCP options diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/node.def deleted file mode 100644 index d6fea411..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/node.def +++ /dev/null @@ -1,50 +0,0 @@ -# This node is run before the rest of the interface is configured. -# We first check to see if DHCPv6 is still configured on the interface by -# looking over at the interface address parameters. Then we check to see -# if the DHCPv6 client program is still running on this interface. If both -# of those are true, then any change to this tree means that the user -# has changed this tree ONLY, and that we are going to have to re-start -# the DHCPv6 client using the new parameters. - - -priority: 319 # Run before interface has been configured - -help: DHCPv6 options - -end: - ifname="$VAR(../../@).$VAR(../@)" - - dhcpv6_set=0 - for param in $VAR(../address/@@); do - if [ "$param" = "dhcpv6" ]; then - dhcpv6_set=1 - fi - done - - if [ $dhcpv6_set -eq 0 ]; then - echo "DHCPv6 is not configured on this interface" - exit 0 - fi - - conffile=/var/lib/dhcp/dhclient_v6_$VAR(../@).conf - if [ ! -e $conffile ]; then - echo "Conf file $conffile doesn't exist" - exit 0 - fi - - if [ -n "$VAR(./parameters-only)" ]; then - arg1="--parameters-only" - fi - - if [ -n "$VAR(./temporary)" ]; then - arg2="--temporary" - fi - - echo "Re-starting DHCPv6 client on ${ifname}..." - sudo /opt/vyatta/sbin/vyatta-dhcpv6-client.pl --stop --start \ - --ifname $ifname $arg1 $arg2 - if [ $? != 0 ]; then - exit 1 - fi - - exit 0 diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/parameters-only/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/parameters-only/node.def deleted file mode 100644 index 0e407f81..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/parameters-only/node.def +++ /dev/null @@ -1,3 +0,0 @@ - -help: Acquire only config parameters, not address - diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/temporary/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/temporary/node.def deleted file mode 100644 index a850ef4b..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/temporary/node.def +++ /dev/null @@ -1,3 +0,0 @@ - -help: IPv6 "temporary" address - diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/disable-link-detect/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/disable-link-detect/node.def deleted file mode 100644 index 5f60e6ab..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/disable-link-detect/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Ignore link state changes -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/bonding/node.tag/vif-s/node.tag/disable/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/disable/node.def deleted file mode 100644 index 12db6a98..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/disable/node.def +++ /dev/null @@ -1,11 +0,0 @@ -help: Disable interface -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/bonding/node.tag/vif-s/node.tag/ethertype/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/ethertype/node.def deleted file mode 100644 index 24d08568..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/ethertype/node.def +++ /dev/null @@ -1,26 +0,0 @@ -type: txt -help: Set Ethertype -syntax:expression: $VAR(@) in "0x88A8", "0x8100";"Must be (0x88A8 0x8100)\n" -default: "0x88A8" - -comp_help: possible completions: - 0x88A8 802.1AD - 0x8100 802.1Q - -update: ACTIVEETHTYPE=`cli-shell-api returnActiveValue interfaces bonding $VAR(../../@) vif-s $VAR(../@) ethertype` - if [ ! -z $VAR(../vif-c/@@) ] && [ ! -z $ACTIVEETHTYPE ] - then echo "Can not change ethertype with vif-c configured" - exit 1 - fi - ETHERTYPE=`echo "$VAR(@)"` - if [ $ETHERTYPE == "0x88A8" ]; then ETHTYPE=802.1ad; fi - if [ $ETHERTYPE == "0x8100" ]; then ETHTYPE=802.1Q; fi - read -a SLAVES </sys/class/net/$VAR(../../@)/bonding/slaves - if [ ${#SLAVES[*]} -eq 0 ]; then - echo "Must configure slave devices for bond interface $VAR(../@) before adding vif" - exit 1 - fi - sudo ip link delete dev "$VAR(../../@).$VAR(../@)" type vlan proto $ETHTYPE id $VAR(../@) > /dev/null 2>&1 - sudo ip link add link $VAR(../../@) name "$VAR(../../@).$VAR(../@)" type vlan proto $ETHTYPE id $VAR(../@) || exit 1 - sudo ip link set "$VAR(../../@).$VAR(../@)" up - /opt/vyatta/sbin/vyatta-link-detect "$VAR(../../@).$VAR(../@)" on diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/mac/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/mac/node.def deleted file mode 100644 index 750710ec..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/mac/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: macaddr -help: Media Access Control (MAC) address - -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../../@).$VAR(../@) --set-mac $VAR(@) diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/mtu/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/mtu/node.def deleted file mode 100644 index b3f3e7c7..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/mtu/node.def +++ /dev/null @@ -1,9 +0,0 @@ -type: u32 -priority: 382 -help: Maximum Transmission Unit (MTU) -val_help: u32:68-9000; Maximum Transmission Unit (MTU) -syntax:expression: $VAR(@) >= 68 && $VAR(@) <= 9000; "MTU must be between 68 and 9000" - -update: sudo ip link set $VAR(../../@).$VAR(../@) mtu $VAR(@) -delete: [ -d /sys/class/net/$VAR(../../@).$VAR(../@) ] || exit 0 - sudo ip link set $VAR(../../@).$VAR(../@) mtu 1500 diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.def deleted file mode 100644 index eb32ce61..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.def +++ /dev/null @@ -1,18 +0,0 @@ -tag: -priority: 321 -type: u32 -help: QinQ TAG-C Virtual Local Area Network (VLAN) ID -syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094" -val_help: u32:0-4094; VLAN ID - -create: read -a SLAVES </sys/class/net/$VAR(../../@)/bonding/slaves - if [ ${#SLAVES[*]} -eq 0 ]; then - echo "Must configure slave devices for bond interface $VAR(../../@) before adding vif" - exit 1 - fi - sudo ip link add link $VAR(../../@).$VAR(../@) name "$VAR(../../@).$VAR(../@).$VAR(@)" type vlan proto 802.1q id $VAR(@) || exit 1 - sudo ip link set "$VAR(../../@).$VAR(../@).$VAR(@)" up - /opt/vyatta/sbin/vyatta-link-detect "$VAR(../../@).$VAR(../@).$VAR(@)" on - -delete: [ -d /sys/class/net/$VAR(../../@).$VAR(../@).$VAR(@) ] || exit 0 - sudo ip link delete dev "$VAR(../../@).$VAR(../@).$VAR(@)" type vlan proto 802.1q id $VAR(@) diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/address/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/address/node.def deleted file mode 100644 index 415ef4b3..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/address/node.def +++ /dev/null @@ -1,17 +0,0 @@ -multi: -type: txt -help: IP address - -syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" - -commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../../../@).$VAR(../../@).$VAR(../@)" - -create: sudo /opt/vyatta/sbin/vyatta-address add $VAR(../../../@).$VAR(../../@).$VAR(../@) $VAR(@) - -delete: sudo /opt/vyatta/sbin/vyatta-address delete $VAR(../../../@).$VAR(../../@).$VAR(../@) $VAR(@) - -allowed: echo "dhcp <>" -val_help: ipv4net; IP address and prefix length -val_help: ipv6net; IPv6 address and prefix length -val_help: dhcp; Dynamic Host Configuration Protocol -val_help: dhcpv6; Dynamic Host Configuration Protocol for IPv6 diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/description/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/description/node.def deleted file mode 100644 index 9324ce1b..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/description/node.def +++ /dev/null @@ -1,8 +0,0 @@ -type: txt -help: Description - -syntax:expression: pattern $VAR(@) "^.{1,256}$" \ - ; "interface description is too long (limit 256 characters)" - -update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../../../@).$VAR(../../@).$VAR(../@)/ifalias" -delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../../@).$VAR(../../@).$VAR(../@)/ifalias" diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/client-id/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/client-id/node.def deleted file mode 100644 index 85ebe6e3..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/client-id/node.def +++ /dev/null @@ -1,2 +0,0 @@ -type: txt -help: DHCP client identifier diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/host-name/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/host-name/node.def deleted file mode 100644 index 80d28fbd..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/host-name/node.def +++ /dev/null @@ -1,2 +0,0 @@ -type: txt -help: DHCP client host name (overrides the system host name) diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/node.def deleted file mode 100644 index e90406df..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/node.def +++ /dev/null @@ -1 +0,0 @@ -help: DHCP options diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/node.def deleted file mode 100644 index 0be14824..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/node.def +++ /dev/null @@ -1,50 +0,0 @@ -# This node is run before the rest of the interface is configured. -# We first check to see if DHCPv6 is still configured on the interface by -# looking over at the interface address parameters. Then we check to see -# if the DHCPv6 client program is still running on this interface. If both -# of those are true, then any change to this tree means that the user -# has changed this tree ONLY, and that we are going to have to re-start -# the DHCPv6 client using the new parameters. - - -priority: 319 # Run before interface has been configured - -help: DHCPv6 options - -end: - ifname="$VAR(../../../@).$VAR(../../@).$VAR(../@)" - - dhcpv6_set=0 - for param in $VAR(../address/@@); do - if [ "$param" = "dhcpv6" ]; then - dhcpv6_set=1 - fi - done - - if [ $dhcpv6_set -eq 0 ]; then - echo "DHCPv6 is not configured on this interface" - exit 0 - fi - - conffile=/var/lib/dhcp/dhclient_v6_$VAR(../@).conf - if [ ! -e $conffile ]; then - echo "Conf file $conffile doesn't exist" - exit 0 - fi - - if [ -n "$VAR(./parameters-only)" ]; then - arg1="--parameters-only" - fi - - if [ -n "$VAR(./temporary)" ]; then - arg2="--temporary" - fi - - echo "Re-starting DHCPv6 client on ${ifname}..." - sudo /opt/vyatta/sbin/vyatta-dhcpv6-client.pl --stop --start \ - --ifname $ifname $arg1 $arg2 - if [ $? != 0 ]; then - exit 1 - fi - - exit 0 diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/parameters-only/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/parameters-only/node.def deleted file mode 100644 index 0e407f81..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/parameters-only/node.def +++ /dev/null @@ -1,3 +0,0 @@ - -help: Acquire only config parameters, not address - diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/temporary/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/temporary/node.def deleted file mode 100644 index a850ef4b..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/temporary/node.def +++ /dev/null @@ -1,3 +0,0 @@ - -help: IPv6 "temporary" address - diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/disable-link-detect/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/disable-link-detect/node.def deleted file mode 100644 index ed593317..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/disable-link-detect/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Ignore link state changes -update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../../@).$VAR(../../@).$VAR(../@) on -delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../../@).$VAR(../../@).$VAR(../@) off diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/disable/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/disable/node.def deleted file mode 100644 index 7069e9c9..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/disable/node.def +++ /dev/null @@ -1,11 +0,0 @@ -help: Disable interface -update: /etc/netplug/linkdown.d/dhclient $VAR(../../../@).$VAR(../../@).$VAR(../@) - if ! sudo ip link set $VAR(../../../@).$VAR(../../@).$VAR(../@) down 2>/dev/null; then - echo "Error disabling dev $VAR(../../../@).$VAR(../../@).$VAR(../@)" - /etc/netplug/linkup.d/dhclient $VAR(../../../@).$VAR(../../@).$VAR(../@) - exit 1 - fi -delete: if ! sudo ip link set $VAR(../../../@).$VAR(../../@).$VAR(../@) up; then - echo "Error enabling dev $VAR(../../../@).$VAR(../../@).$VAR(../@)" - exit 1 - fi diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/mac/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/mac/node.def deleted file mode 100644 index 24b4b4d7..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/mac/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: macaddr -help: Media Access Control (MAC) address - -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../../../@).$VAR(../../@).$VAR(../@) --set-mac $VAR(@) diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/mtu/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/mtu/node.def deleted file mode 100644 index 264c429b..00000000 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/mtu/node.def +++ /dev/null @@ -1,9 +0,0 @@ -type: u32 -priority: 382 -help: Maximum Transmission Unit (MTU) -val_help: u32:68-9000; Maximum Transmission Unit (MTU) -syntax:expression: $VAR(@) >= 68 && $VAR(@) <= 9000; "MTU must be between 68 and 9000" - -update: sudo ip link set $VAR(../../../@).$VAR(../../@).$VAR(../@) mtu $VAR(@) -delete: [ -d /sys/class/net/$VAR(../../../@).$VAR(../../@).$VAR(../@) ] || exit 0 - sudo ip link set $VAR(../../../@).$VAR(../../@).$VAR(../@) mtu 1500 diff --git a/templates/interfaces/bonding/node.tag/vif/node.def b/templates/interfaces/bonding/node.tag/vif/node.def deleted file mode 100644 index e7262d63..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.def +++ /dev/null @@ -1,18 +0,0 @@ -tag: -priority: 320 -type: u32 -help: Virtual Local Area Network (VLAN) ID -syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094" -val_help: u32:0-4094; VLAN ID - -create: read -a SLAVES </sys/class/net/$VAR(../@)/bonding/slaves - if [ ${#SLAVES[*]} -eq 0 ]; then - echo "Must configure slave devices for bond interface $VAR(../@) before adding vif" - exit 1 - fi - sudo ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan id $VAR(@) || exit 1 - sudo ip link set "$VAR(../@).$VAR(@)" up - /opt/vyatta/sbin/vyatta-link-detect "$VAR(../@).$VAR(@)" on - -delete: [ -d /sys/class/net/$VAR(../@).$VAR(@) ] || exit 0 - sudo ip link delete dev "$VAR(../@).$VAR(@)" type vlan id $VAR(@) diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def deleted file mode 100644 index f025dece..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def +++ /dev/null @@ -1,17 +0,0 @@ -multi: -type: txt -help: IP address - -syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" - -commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../../@).$VAR(../@)" - -create: sudo /opt/vyatta/sbin/vyatta-address add $VAR(../../@).$VAR(../@) $VAR(@) - -delete: sudo /opt/vyatta/sbin/vyatta-address delete $VAR(../../@).$VAR(../@) $VAR(@) - -allowed: echo "dhcp <>" -val_help: ipv4net; IP address and prefix length -val_help: ipv6net; IPv6 address and prefix length -val_help: dhcp; Dynamic Host Configuration Protocol -val_help: dhcpv6; Dynamic Host Configuration Protocol for IPv6 diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def deleted file mode 100644 index a0b29f05..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def +++ /dev/null @@ -1,8 +0,0 @@ -type: txt -help: Description - -syntax:expression: pattern $VAR(@) "^.{1,256}$" \ - ; "interface description is too long (limit 256 characters)" - -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/bonding/node.tag/vif/node.tag/dhcp-options/client-id/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/dhcp-options/client-id/node.def deleted file mode 100644 index 85ebe6e3..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/dhcp-options/client-id/node.def +++ /dev/null @@ -1,2 +0,0 @@ -type: txt -help: DHCP client identifier diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/dhcp-options/host-name/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/dhcp-options/host-name/node.def deleted file mode 100644 index 80d28fbd..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/dhcp-options/host-name/node.def +++ /dev/null @@ -1,2 +0,0 @@ -type: txt -help: DHCP client host name (overrides the system host name) diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/dhcp-options/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/dhcp-options/node.def deleted file mode 100644 index e90406df..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/dhcp-options/node.def +++ /dev/null @@ -1 +0,0 @@ -help: DHCP options diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/node.def deleted file mode 100644 index 41975dea..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/node.def +++ /dev/null @@ -1,50 +0,0 @@ -# This node is run before the rest of the interface is configured. -# We first check to see if DHCPv6 is still configured on the interface by -# looking over at the interface address parameters. Then we check to see -# if the DHCPv6 client program is still running on this interface. If both -# of those are true, then any change to this tree means that the user -# has changed this tree ONLY, and that we are going to have to re-start -# the DHCPv6 client using the new parameters. - - -priority: 317 # Run before interface has been configured - -help: DHCPv6 options - -end: - ifname="$VAR(../../@).$VAR(../@)" - - dhcpv6_set=0 - for param in $VAR(../address/@@); do - if [ "$param" = "dhcpv6" ]; then - dhcpv6_set=1 - fi - done - - if [ $dhcpv6_set -eq 0 ]; then - echo "DHCPv6 is not configured on this interface" - exit 0 - fi - - conffile=/var/lib/dhcp/dhclient_v6_$VAR(../@).conf - if [ ! -e $conffile ]; then - echo "Conf file $conffile doesn't exist" - exit 0 - fi - - if [ -n "$VAR(./parameters-only)" ]; then - arg1="--parameters-only" - fi - - if [ -n "$VAR(./temporary)" ]; then - arg2="--temporary" - fi - - echo "Re-starting DHCPv6 client on ${ifname}..." - sudo /opt/vyatta/sbin/vyatta-dhcpv6-client.pl --stop --start \ - --ifname $ifname $arg1 $arg2 - if [ $? != 0 ]; then - exit 1 - fi - - exit 0 diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/parameters-only/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/parameters-only/node.def deleted file mode 100644 index 0e407f81..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/parameters-only/node.def +++ /dev/null @@ -1,3 +0,0 @@ - -help: Acquire only config parameters, not address - diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/temporary/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/temporary/node.def deleted file mode 100644 index a850ef4b..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/temporary/node.def +++ /dev/null @@ -1,3 +0,0 @@ - -help: IPv6 "temporary" address - diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/disable-link-detect/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/disable-link-detect/node.def deleted file mode 100644 index 5f60e6ab..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/disable-link-detect/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Ignore link state changes -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/bonding/node.tag/vif/node.tag/disable/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/disable/node.def deleted file mode 100644 index 12db6a98..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/disable/node.def +++ /dev/null @@ -1,11 +0,0 @@ -help: Disable interface -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/bonding/node.tag/vif/node.tag/mac/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/mac/node.def deleted file mode 100644 index 750710ec..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/mac/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: macaddr -help: Media Access Control (MAC) address - -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../../@).$VAR(../@) --set-mac $VAR(@) diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/mtu/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/mtu/node.def deleted file mode 100644 index b3f3e7c7..00000000 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/mtu/node.def +++ /dev/null @@ -1,9 +0,0 @@ -type: u32 -priority: 382 -help: Maximum Transmission Unit (MTU) -val_help: u32:68-9000; Maximum Transmission Unit (MTU) -syntax:expression: $VAR(@) >= 68 && $VAR(@) <= 9000; "MTU must be between 68 and 9000" - -update: sudo ip link set $VAR(../../@).$VAR(../@) mtu $VAR(@) -delete: [ -d /sys/class/net/$VAR(../../@).$VAR(../@) ] || exit 0 - sudo ip link set $VAR(../../@).$VAR(../@) mtu 1500 |