summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-15 20:12:20 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-15 20:12:20 +0200
commit2908150adea4bbf7d8b1dd6ae9a84bdd53617708 (patch)
tree9390f0cf12bf9d1a4fc7c9cdcf6d44d93a4e5570
parent0758b396d570b2ad4397ec35f5916515e8c223f9 (diff)
parent19e0bb3c555e0f6e948cc15b33637a770df225b5 (diff)
downloadvyatta-cfg-system-2908150adea4bbf7d8b1dd6ae9a84bdd53617708.tar.gz
vyatta-cfg-system-2908150adea4bbf7d8b1dd6ae9a84bdd53617708.zip
Merge branch 'current' of github.com:vyos/vyatta-cfg-system into equuleus
* 'current' of github.com:vyos/vyatta-cfg-system: T1616: fix DHCPv6 script behaviour in op mode. openvpn: T1630: add system user openvpn vxlan: T1636: initial rewrite with XML and Python Makefile.am: fix after removing files for bridge and bonding bridge: T1615: remove old vyatta-bridge.pl bonding: T1614: increase config version from interfaces 1 -> 2 bonding: T1614: remove old style node.def files in favour of XML/Python rewrite bridge: T1556: migrate bridge config to XML/Python [tunnel] T1593: Added ip6gre encapsulation for tunnel interfaces loopback: T1601: rewrite using XML/Python definitions powerdns: T1595: add config migrator to remove 'listen-on' powerdns: T1524: support setting allow-from network dummy: T1580: rewrite in new style XML/Python
-rw-r--r--Makefile.am5
-rw-r--r--cfg-version/dns-forwarding@2 (renamed from cfg-version/interfaces@1)0
-rw-r--r--cfg-version/interfaces@20
-rwxr-xr-xdebian/vyatta-cfg-system.postinst.in5
-rwxr-xr-xscripts/vyatta-bonding.pl288
-rwxr-xr-xscripts/vyatta-bridge.pl132
-rwxr-xr-xscripts/vyatta-dhcpv6-client.pl10
-rw-r--r--templates/interfaces/bonding/node.def35
-rw-r--r--templates/interfaces/bonding/node.tag/address/node.def18
-rw-r--r--templates/interfaces/bonding/node.tag/arp-monitor/interval/node.def7
-rw-r--r--templates/interfaces/bonding/node.tag/arp-monitor/node.def1
-rw-r--r--templates/interfaces/bonding/node.tag/arp-monitor/target/node.def7
-rw-r--r--templates/interfaces/bonding/node.tag/description/node.def8
-rw-r--r--templates/interfaces/bonding/node.tag/dhcp-options/client-id/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/dhcp-options/host-name/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/dhcp-options/node.def1
-rw-r--r--templates/interfaces/bonding/node.tag/dhcpv6-options/node.def52
-rw-r--r--templates/interfaces/bonding/node.tag/dhcpv6-options/parameters-only/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/dhcpv6-options/temporary/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/disable-link-detect/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/disable/node.def11
-rw-r--r--templates/interfaces/bonding/node.tag/hash-policy/node.def12
-rw-r--r--templates/interfaces/bonding/node.tag/ip/arp-cache-timeout/node.def9
-rw-r--r--templates/interfaces/bonding/node.tag/ip/enable-proxy-arp/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/ip/proxy-arp-pvlan/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/mac/node.def6
-rw-r--r--templates/interfaces/bonding/node.tag/mode/node.def19
-rw-r--r--templates/interfaces/bonding/node.tag/mtu/node.def7
-rw-r--r--templates/interfaces/bonding/node.tag/primary/node.def10
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.def26
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/address/node.def17
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/bridge/node.def8
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/cost/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/priority/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/description/node.def8
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcp-options/client-id/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcp-options/host-name/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcp-options/node.def1
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/node.def50
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/parameters-only/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/dhcpv6-options/temporary/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/disable-link-detect/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/disable/node.def11
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/ethertype/node.def26
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/mac/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/mtu/node.def9
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.def18
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/address/node.def17
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/bridge/node.def8
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/cost/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/priority/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/description/node.def8
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/client-id/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/host-name/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcp-options/node.def1
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/node.def50
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/parameters-only/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/temporary/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/disable-link-detect/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/disable/node.def11
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/mac/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/mtu/node.def9
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.def18
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def17
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/bridge/node.def8
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/cost/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/priority/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def8
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/dhcp-options/client-id/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/dhcp-options/host-name/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/dhcp-options/node.def1
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/node.def50
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/parameters-only/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/dhcpv6-options/temporary/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/disable-link-detect/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/disable/node.def11
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/mac/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/mtu/node.def9
-rw-r--r--templates/interfaces/dummy/node.def15
-rw-r--r--templates/interfaces/dummy/node.tag/address/node.def12
-rw-r--r--templates/interfaces/dummy/node.tag/description/node.def8
-rw-r--r--templates/interfaces/dummy/node.tag/disable/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/bond-group/node.def12
-rw-r--r--templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/bridge/node.def9
-rw-r--r--templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/cost/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/priority/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/bridge/node.def9
-rw-r--r--templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/cost/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/priority/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/bridge/node.def9
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/cost/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/priority/node.def4
-rw-r--r--templates/interfaces/loopback/node.def11
-rw-r--r--templates/interfaces/loopback/node.tag/address/node.def11
-rw-r--r--templates/interfaces/loopback/node.tag/description/node.def8
-rw-r--r--templates/interfaces/tunnel/node.def9
-rw-r--r--templates/interfaces/tunnel/node.tag/encapsulation/node.def5
-rw-r--r--templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/bridge/node.def20
-rw-r--r--templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/cost/node.def4
-rw-r--r--templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/node.def1
-rw-r--r--templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/priority/node.def4
-rw-r--r--templates/interfaces/vxlan/node.def68
-rw-r--r--templates/interfaces/vxlan/node.tag/address/node.def18
-rw-r--r--templates/interfaces/vxlan/node.tag/description/node.def8
-rw-r--r--templates/interfaces/vxlan/node.tag/group/node.def9
-rw-r--r--templates/interfaces/vxlan/node.tag/ip/arp-cache-timeout/node.def9
-rw-r--r--templates/interfaces/vxlan/node.tag/ip/enable-proxy-arp/node.def3
-rw-r--r--templates/interfaces/vxlan/node.tag/link/node.def10
-rw-r--r--templates/interfaces/vxlan/node.tag/mtu/node.def17
-rw-r--r--templates/interfaces/vxlan/node.tag/remote-port/node.def11
-rw-r--r--templates/interfaces/vxlan/node.tag/remote/node.def9
-rw-r--r--templates/interfaces/vxlan/node.tag/vni/node.def10
118 files changed, 25 insertions, 1483 deletions
diff --git a/Makefile.am b/Makefile.am
index dc4f43f2..3c0fbb0a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -50,7 +50,6 @@ sbin_SCRIPTS += scripts/telnetd.init
sbin_SCRIPTS += scripts/vyatta-interfaces.pl
sbin_SCRIPTS += scripts/vyatta-address
sbin_SCRIPTS += scripts/vyatta-tunnel-cleanup
-sbin_SCRIPTS += scripts/vyatta-bonding.pl
sbin_SCRIPTS += scripts/vyatta-raid-event
sbin_SCRIPTS += scripts/vyatta-update-arp-params
sbin_SCRIPTS += scripts/vyatta-banner.pl
@@ -61,7 +60,6 @@ sbin_SCRIPTS += scripts/install/install-image-new
sbin_SCRIPTS += scripts/install/install-image-existing
sbin_SCRIPTS += scripts/install/install-postinst-new
sbin_SCRIPTS += scripts/install/install-image
-sbin_SCRIPTS += scripts/vyatta-bridge.pl
sbin_SCRIPTS += scripts/vyatta-bridgegroup-depedency.pl
sbin_SCRIPTS += scripts/vyatta-dhcpv6-client.pl
sbin_SCRIPTS += scripts/vyatta-update-grub.pl
@@ -118,7 +116,8 @@ curver_DATA += cfg-version/l2tp@1
curver_DATA += cfg-version/pptp@1
curver_DATA += cfg-version/ntp@1
curver_DATA += cfg-version/webproxy@2
-curver_DATA += cfg-version/interfaces@1
+curver_DATA += cfg-version/interfaces@2
+curver_DATA += cfg-version/dns-forwarding@2
cpiop = find . ! -regex '\(.*~\|.*\.bak\|.*\.swp\|.*\#.*\#\)' -print0 | \
cpio -0pd
diff --git a/cfg-version/interfaces@1 b/cfg-version/dns-forwarding@2
index e69de29b..e69de29b 100644
--- a/cfg-version/interfaces@1
+++ b/cfg-version/dns-forwarding@2
diff --git a/cfg-version/interfaces@2 b/cfg-version/interfaces@2
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/cfg-version/interfaces@2
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in
index 965563c8..18e84055 100755
--- a/debian/vyatta-cfg-system.postinst.in
+++ b/debian/vyatta-cfg-system.postinst.in
@@ -28,6 +28,11 @@ if ! grep -q '^tss' /etc/passwd; then
adduser --system --group --shell /usr/sbin/nologin --home /var/lib/tpm tss
fi
+# OpenVPN should get its own user
+if ! grep -q '^openvpn' /etc/passwd; then
+ sudo adduser --system --group --shell /usr/sbin/nologin --home /var/lib/openvpn openvpn
+fi
+
# Remove leftover udev files from earlier release
if [ -d /etc/udev/rules.d/ ]; then
rm -f /etc/udev/rules.d/*vyatta-net.rules
diff --git a/scripts/vyatta-bonding.pl b/scripts/vyatta-bonding.pl
deleted file mode 100755
index 24182af3..00000000
--- a/scripts/vyatta-bonding.pl
+++ /dev/null
@@ -1,288 +0,0 @@
-#!/usr/bin/perl
-#
-# **** License ****
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# A copy of the GNU General Public License is available as
-# `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution
-# or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'.
-# You can also obtain it by writing to the Free Software Foundation,
-# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301, USA.
-#
-# This code was originally developed by Vyatta, Inc.
-# Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc.
-# All Rights Reserved.
-#
-# Author: Stephen Hemminger
-# Date: September 2008
-# Description: Script to setup bonding interfaces
-#
-# **** End License ****
-#
-
-use lib "/opt/vyatta/share/perl5/";
-use Vyatta::Interface;
-use Vyatta::Config;
-use Getopt::Long;
-
-use strict;
-use warnings;
-
-my %modes = (
- "round-robin" => 0,
- "active-backup" => 1,
- "xor-hash" => 2,
- "broadcast" => 3,
- "802.3ad" => 4,
- "transmit-load-balance" => 5,
- "adaptive-load-balance" => 6,
-);
-
-sub set_mode {
- my ( $intf, $mode ) = @_;
- my $val = $modes{$mode};
- die "Unknown bonding mode $mode\n" unless defined($val);
-
- open my $fm, '>', "/sys/class/net/$intf/bonding/mode"
- or die "Error: $intf is not a bonding device:$!\n";
- print {$fm} $val, "\n";
- close $fm
- or die "Error: $intf can not set mode $val:$!\n";
-}
-
-sub set_hash_policy {
- my ( $intf, $hash ) = @_;
-
- open my $fm, '>', "/sys/class/net/$intf/bonding/xmit_hash_policy"
- or die "Error: $intf is not a bonding device:$!\n";
- print {$fm} $hash, "\n";
- close $fm
- or die "Error: $intf can not set hash $hash:$!\n";
-}
-
-sub get_slaves {
- my $intf = shift;
-
- open my $f, '<', "/sys/class/net/$intf/bonding/slaves"
- or die "$intf is not a bonding interface";
- my $slaves = <$f>;
- close $f;
- return unless $slaves;
-
- chomp $slaves;
- return split( ' ', $slaves );
-}
-
-sub add_slave {
- my ( $intf, $slave ) = @_;
- my $sysfs_slaves = "/sys/class/net/$intf/bonding/slaves";
-
- open my $f, '>', $sysfs_slaves
- or die "Can't open $sysfs_slaves: $!";
-
- print {$f} "+$slave\n";
- close $f;
-}
-
-sub remove_slave {
- my ( $intf, $slave ) = @_;
- my $sysfs_slaves = "/sys/class/net/$intf/bonding/slaves";
-
- open my $f, '>', $sysfs_slaves
- or die "Can't open $sysfs_slaves: $!";
-
- print {$f} "-$slave\n";
- close $f;
-}
-
-# Go dumpster diving to figure out which ethernet interface (if any)
-# gave it's address to be used by all bonding devices.
-sub primary_slave {
- my ( $intf, $bond_addr ) = @_;
-
- open my $p, '<', "/proc/net/bonding/$intf"
- or die "Can't open /proc/net/bonding/$intf : $!";
-
- my ( $dev, $match );
- while ( my $line = <$p> ) {
- chomp $line;
- if ( $line =~ m/^Slave Interface: (.*)$/ ) {
- $dev = $1;
- }
- elsif ( $line =~ m/^Permanent HW addr: (.*)$/ ) {
- if ( $1 eq $bond_addr ) {
- $match = $dev;
- last;
- }
- }
- }
- close $p;
-
- return $match;
-}
-
-sub get_irq_affinity {
- my $intf = shift;
- my $cfg = new Vyatta::Config;
-
- my $slaveif = new Vyatta::Interface($intf);
- unless ($slaveif) {
- warn "$intf: unknown interface type";
- return;
- }
- $cfg->setLevel($slaveif->path());
- return $cfg->returnValue('smp-affinity');
-}
-
-sub if_down {
- my $intf = shift;
- system "sudo ip link set dev $intf down"
- and die "Could not set $intf up ($!)\n";
-}
-
-sub if_up {
- my $intf = shift;
- system "sudo ip link set dev $intf up"
- and die "Could not set $intf up ($!)\n";
-
- my $smp_affinity = get_irq_affinity($intf);
- if ($smp_affinity) {
- system "/opt/vyatta/sbin/irq-affinity.pl $intf $smp_affinity"
- and warn "Could not set $intf smp-affinity $smp_affinity\n";
- }
-}
-
-# Can't change mode when bond device is up and slaves are attached
-sub change_mode {
- my ( $intf, $mode ) = @_;
- my $interface = new Vyatta::Interface($intf);
- die "$intf is not a valid interface" unless $interface;
-
- my $bond_up = $interface->up();
-
- if_down($intf) if ($bond_up);
-
- # Remove all interfaces; do primary last
- my $primary = primary_slave( $intf, $interface->hw_address());
- my @slaves = get_slaves($intf);
-
- foreach my $slave (@slaves) {
- remove_slave( $intf, $slave ) unless ( $primary && $slave eq $primary );
- }
- remove_slave( $intf, $primary ) if ($primary);
-
- set_mode( $intf, $mode );
-
- add_slave( $intf, $primary) if ($primary);
- foreach my $slave ( @slaves ) {
- add_slave( $intf, $slave ) unless ($primary && $slave eq $primary);
- }
- if_up($intf) if ($bond_up);
-}
-
-# Can't change hash when bond device is up
-sub change_hash {
- my ( $intf, $hash ) = @_;
- my $interface = new Vyatta::Interface($intf);
- die "$intf is not a valid interface" unless $interface;
- my $bond_up = $interface->up();
-
- if_down($intf) if $bond_up;
- set_hash_policy( $intf, $hash );
- if_up($intf) if $bond_up;
-}
-
-# Consistency checks prior to commit
-sub commit_check {
- my ( $intf, $slave ) = @_;
- my $cfg = new Vyatta::Config;
-
- die "Bonding interface $intf does not exist\n"
- unless ( -d "/sys/class/net/$intf" );
-
- my $slaveif = new Vyatta::Interface($slave);
- die "$slave: unknown interface type" unless $slaveif;
- $cfg->setLevel($slaveif->path());
-
- die "Error: can not add disabled interface $slave to bond-group $intf\n"
- if $cfg->exists('disable');
-
- die "Error: can not add interface $slave that is part of bridge to bond-group\n"
- if defined($cfg->returnValue("bridge-group bridge"));
-
- my @addr = $cfg->returnValues('address');
- die "Error: can not add interface $slave with addresses to bond-group\n"
- if (@addr);
-
- my @vrrp = $cfg->listNodes('vrrp vrrp-group');
- die "Error: can not add interface $slave with VRRP to bond-group\n"
- if (@vrrp);
-
- $cfg->setLevel('interfaces pseudo-ethernet');
- foreach my $peth ($cfg->listNodes()) {
- my $link = $cfg->returnValue("$peth link");
-
- die "Error: can not add interface $slave to bond-group already used by pseudo-ethernet $peth\n"
- if ($link eq $slave);
- }
-}
-
-# bonding requires interface to be down before enslaving
-# but enslaving automatically brings interface up!
-sub add_port {
- my ( $intf, $slave ) = @_;
- my $cfg = new Vyatta::Config;
- my $slaveif = new Vyatta::Interface($slave);
- die "$slave: unknown interface type" unless $slaveif;
-
- $cfg->setLevel($slaveif->path());
- my $old = $cfg->returnOrigValue('bond-group');
-
- if_down($slave) if ($slaveif->up());
- remove_slave($old, $slave) if $old;
- add_slave ($intf, $slave);
-}
-
-sub remove_port {
- my ( $intf, $slave ) = @_;
-
- remove_slave ($intf, $slave);
- if_up ($slave);
-}
-
-sub usage {
- print "Usage: $0 --dev=bondX --mode={mode}\n";
- print " $0 --dev=bondX --hash=layerX\n";
- print " $0 --dev=bondX --add=ethX\n";
- print " $0 --dev=bondX --remove=ethX\n";
- print print "modes := ", join( ',', sort( keys %modes ) ), "\n";
-
- exit 1;
-}
-
-my ( $dev, $mode, $hash, $add_port, $rem_port, $check );
-
-GetOptions(
- 'dev=s' => \$dev,
- 'mode=s' => \$mode,
- 'hash=s' => \$hash,
- 'add=s' => \$add_port,
- 'remove=s' => \$rem_port,
- 'check=s' => \$check,
-) or usage();
-
-die "$0: device not specified\n" unless $dev;
-
-commit_check($dev, $check) if $check;
-change_mode( $dev, $mode ) if $mode;
-change_hash( $dev, $hash ) if $hash;
-add_port( $dev, $add_port ) if $add_port;
-remove_port( $dev, $rem_port ) if $rem_port;
diff --git a/scripts/vyatta-bridge.pl b/scripts/vyatta-bridge.pl
deleted file mode 100755
index 7602c2ce..00000000
--- a/scripts/vyatta-bridge.pl
+++ /dev/null
@@ -1,132 +0,0 @@
-#! /usr/bin/perl
-#
-# **** License ****
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# A copy of the GNU General Public License is available as
-# `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution
-# or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'.
-# You can also obtain it by writing to the Free Software Foundation,
-# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301, USA.
-#
-# This code was originally developed by Vyatta, Inc.
-# Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc.
-# All Rights Reserved.
-#
-# Author: Stephen Hemminger
-# Date: November 2010
-# Description: Script to setup bridge ports
-#
-# **** End License ****
-#
-
-use strict;
-use warnings;
-
-use lib "/opt/vyatta/share/perl5/";
-use Vyatta::Interface;
-use Vyatta::Config;
-
-my $BRCTL = 'sudo /sbin/brctl';
-
-die "Usage: $0 ACTION ethX\n" unless ($#ARGV == 1);
-
-my ($action, $ifname) = @ARGV;
-
-# Get bridge information from configuration
-my $intf = new Vyatta::Interface($ifname);
-die "Unknown interface type $ifname\n"
- unless $intf;
-
-my $cfg = new Vyatta::Config;
-$cfg->setLevel($intf->path());
-
-my $oldbridge = $cfg->returnOrigValue('bridge-group bridge');
-my $newbridge = $cfg->returnValue('bridge-group bridge');
-my $cost = $cfg->returnValue('bridge-group cost');
-my $priority = $cfg->returnValue('bridge-group priority');
-
-if (!defined($newbridge) && ($action ne 'SET')) {
- $action = 'DELETE';
-}
-
-if (!defined($oldbridge) && ($action ne 'DELETE')) {
- $action = 'SET';
-}
-
-if ($action eq 'SET') {
- die "Error: $ifname: not in a bridge-group\n" unless $newbridge;
-
- die "Error: can not add interface $ifname that is part of bond-group to bridge\n"
- if defined($cfg->returnValue('bond-group'));
-
- my @address = $cfg->returnValues('address');
- die "Error: Can not add interface $ifname with addresses to bridge\n"
- if (@address);
-
- my @vrrp = $cfg->listNodes('vrrp vrrp-group');
- die "Error: Can not add interface $ifname with VRRP to bridge\n"
- if (@vrrp);
-
- $cfg->setLevel('interfaces pseudo-ethernet');
- foreach my $peth ($cfg->listNodes()) {
- my $link = $cfg->returnValue("$peth link");
-
- die "Error: can not add interface $ifname to bridge already used by pseudo-ethernet $peth\n"
- if ($link eq $ifname);
- }
-
- print "Adding interface $ifname to bridge $newbridge\n";
- add_bridge_port($newbridge, $ifname, $cost, $priority);
-
-} elsif ($action eq 'DELETE') {
- die "Error: $ifname: not in a bridge-group\n" unless $oldbridge;
-
- print "Removing interface $ifname from bridge $oldbridge\n";
- remove_bridge_port($oldbridge, $ifname);
-
-} elsif ($oldbridge ne $newbridge) {
- print "Moving interface $ifname from $oldbridge to $newbridge\n";
- remove_bridge_port($oldbridge, $ifname);
- add_bridge_port($newbridge, $ifname, $cost, $priority);
-}
-
-exit 0;
-
-sub add_bridge_port {
- my ($bridge, $port, $cost, $priority) = @_;
- system("$BRCTL addif $bridge $port") == 0
- or exit 1;
-
- if ($cost) {
- system("$BRCTL setpathcost $bridge $port $cost") == 0
- or exit 1;
- }
-
- if ($priority) {
- system("$BRCTL setportprio $bridge $port $priority") == 0
- or exit 1;
- }
-}
-
-sub remove_bridge_port {
- my ($bridge, $port) = @_;
- return unless $bridge; # not part of a bridge
-
- # this is the case where the bridge that this interface is assigned
- # to is getting deleted in the same commit as the bridge node under
- # this interface - Bug 5064|4734. Since bridge has a higher priority;
- # it gets deleted before the removal of bridge-groups under interfaces
- return unless (-d "/sys/class/net/$bridge");
-
- system("$BRCTL delif $bridge $ifname") == 0
- or exit 1;
-}
diff --git a/scripts/vyatta-dhcpv6-client.pl b/scripts/vyatta-dhcpv6-client.pl
index 64c6840d..b78d40b5 100755
--- a/scripts/vyatta-dhcpv6-client.pl
+++ b/scripts/vyatta-dhcpv6-client.pl
@@ -57,8 +57,14 @@ sub gen_conf_file {
my $config = new Vyatta::Config;
$config->setLevel($level);
- if ($config->exists('duid')) {
- my $duid = $config->returnValue('duid');
+ my $duid = '';
+ if($config->inSession()) {
+ $duid = $config->returnValue('duid');
+ } else {
+ $duid = $config->returnEffectiveValue('duid');
+ }
+
+ if($duid) {
print $FD_WR " send dhcp6.client-id $duid;\n";
}
# my $hostname = hostname;
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/bridge-group/bridge/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/bridge/node.def
deleted file mode 100644
index 0766f8af..00000000
--- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/bridge/node.def
+++ /dev/null
@@ -1,8 +0,0 @@
-type: txt
-
-help: Bridge group interface
-
-commit:expression: exec \
- "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bridge"
-
-allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=bridge
diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/cost/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/cost/node.def
deleted file mode 100644
index 243747b9..00000000
--- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/cost/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Path cost for this port
-syntax:expression: $VAR(@) >= 1 && $VAR(@) < 65536 ; "Bridge cost value must be between 1 and 65535"
-val_help: u32:1-65535; Path cost value for Spanning Tree Protocol
diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/node.def
deleted file mode 100644
index b603bb8c..00000000
--- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-priority: 325 # after vif and bridge
-help: Add this interface to a bridge group
-
-end: /opt/vyatta/sbin/vyatta-bridge.pl ${COMMIT_ACTION} $VAR(../../@).$VAR(../@)
diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/priority/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/priority/node.def
deleted file mode 100644
index be0ff479..00000000
--- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/bridge-group/priority/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Bridge port priority
-syntax:expression: $VAR(@) >= 0 &&$VAR(@) < 64; "Port priority must be between 0-63"
-val_help: u32:0-63; Bridge port priority
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/bridge-group/bridge/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/bridge/node.def
deleted file mode 100644
index 0766f8af..00000000
--- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/bridge/node.def
+++ /dev/null
@@ -1,8 +0,0 @@
-type: txt
-
-help: Bridge group interface
-
-commit:expression: exec \
- "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bridge"
-
-allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=bridge
diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/cost/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/cost/node.def
deleted file mode 100644
index 243747b9..00000000
--- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/cost/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Path cost for this port
-syntax:expression: $VAR(@) >= 1 && $VAR(@) < 65536 ; "Bridge cost value must be between 1 and 65535"
-val_help: u32:1-65535; Path cost value for Spanning Tree Protocol
diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/node.def
deleted file mode 100644
index f1e45c42..00000000
--- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-priority: 325 # after vif and bridge
-help: Add this interface to a bridge group
-
-end: /opt/vyatta/sbin/vyatta-bridge.pl ${COMMIT_ACTION} $VAR(../../../@).$VAR(../../@).$VAR(../@)
diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/priority/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/priority/node.def
deleted file mode 100644
index be0ff479..00000000
--- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/priority/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Bridge port priority
-syntax:expression: $VAR(@) >= 0 &&$VAR(@) < 64; "Port priority must be between 0-63"
-val_help: u32:0-63; Bridge port priority
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/bridge-group/bridge/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/bridge/node.def
deleted file mode 100644
index 0766f8af..00000000
--- a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/bridge/node.def
+++ /dev/null
@@ -1,8 +0,0 @@
-type: txt
-
-help: Bridge group interface
-
-commit:expression: exec \
- "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bridge"
-
-allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=bridge
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/cost/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/cost/node.def
deleted file mode 100644
index 243747b9..00000000
--- a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/cost/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Path cost for this port
-syntax:expression: $VAR(@) >= 1 && $VAR(@) < 65536 ; "Bridge cost value must be between 1 and 65535"
-val_help: u32:1-65535; Path cost value for Spanning Tree Protocol
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/node.def
deleted file mode 100644
index b603bb8c..00000000
--- a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-priority: 325 # after vif and bridge
-help: Add this interface to a bridge group
-
-end: /opt/vyatta/sbin/vyatta-bridge.pl ${COMMIT_ACTION} $VAR(../../@).$VAR(../@)
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/priority/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/priority/node.def
deleted file mode 100644
index be0ff479..00000000
--- a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/priority/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Bridge port priority
-syntax:expression: $VAR(@) >= 0 &&$VAR(@) < 64; "Port priority must be between 0-63"
-val_help: u32:0-63; Bridge port priority
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
diff --git a/templates/interfaces/dummy/node.def b/templates/interfaces/dummy/node.def
deleted file mode 100644
index 1908f9d8..00000000
--- a/templates/interfaces/dummy/node.def
+++ /dev/null
@@ -1,15 +0,0 @@
-tag:
-priority: 300
-type: txt
-help: Dummy interface name
-syntax:expression: pattern $VAR(@) "^dum[0-9]+$" \
- ; "name must be (dum0-dum999)"
-val_help: <dumN>; Dummy interface name
-
-begin: [ -d /sys/module/dummy ] || sudo modprobe dummy
-
-create: sudo ip link add name $VAR(@) type dummy
- sudo ip link set $VAR(@) up
-
-delete: sudo ip link set dev $VAR(@) down
- sudo ip link delete dev $VAR(@)
diff --git a/templates/interfaces/dummy/node.tag/address/node.def b/templates/interfaces/dummy/node.tag/address/node.def
deleted file mode 100644
index 04612379..00000000
--- a/templates/interfaces/dummy/node.tag/address/node.def
+++ /dev/null
@@ -1,12 +0,0 @@
-multi:
-type: ipv4net,ipv6net
-val_help: ipv4net; IPv4 address and prefix length
-val_help: ipv6net; IPv6 address and prefix length
-help: IP address
-
-syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
-
-create: sudo /opt/vyatta/sbin/vyatta-address add $VAR(../@) $VAR(@)
-
-delete: sudo /opt/vyatta/sbin/vyatta-address delete $VAR(../@) $VAR(@)
-
diff --git a/templates/interfaces/dummy/node.tag/description/node.def b/templates/interfaces/dummy/node.tag/description/node.def
deleted file mode 100644
index c6d2789d..00000000
--- a/templates/interfaces/dummy/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/dummy/node.tag/disable/node.def b/templates/interfaces/dummy/node.tag/disable/node.def
deleted file mode 100644
index 8c580c95..00000000
--- a/templates/interfaces/dummy/node.tag/disable/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-help: Disable interface
-update: sudo ip link set $VAR(../@) down
-
-delete: sudo ip link set $VAR(../@) up
diff --git a/templates/interfaces/ethernet/node.tag/bond-group/node.def b/templates/interfaces/ethernet/node.tag/bond-group/node.def
deleted file mode 100644
index dff97395..00000000
--- a/templates/interfaces/ethernet/node.tag/bond-group/node.def
+++ /dev/null
@@ -1,12 +0,0 @@
-priority: 319
-type: txt
-help: Assign interface to bonding group
-allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show=bonding
-syntax:expression: pattern $VAR(@) "^bond[0-9]+$" \
- ; "$VAR(@): not a valid name for a bonding interface"
-
-commit:expression: exec "${vyatta_sbindir}/vyatta-bonding.pl --dev=$VAR(@) --check=$VAR(../@)"
-
-update: sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$VAR(@) --add=$VAR(../@)
-
-delete: sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$VAR(@) --remove=$VAR(../@)
diff --git a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/bridge/node.def b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/bridge/node.def
deleted file mode 100644
index 0d1f16e2..00000000
--- a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/bridge/node.def
+++ /dev/null
@@ -1,9 +0,0 @@
-type: txt
-
-help: Bridge group interface
-
-commit:expression: exec \
- "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bridge"
-
-allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=bridge
-
diff --git a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/cost/node.def b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/cost/node.def
deleted file mode 100644
index 243747b9..00000000
--- a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/cost/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Path cost for this port
-syntax:expression: $VAR(@) >= 1 && $VAR(@) < 65536 ; "Bridge cost value must be between 1 and 65535"
-val_help: u32:1-65535; Path cost value for Spanning Tree Protocol
diff --git a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/node.def
deleted file mode 100644
index dfd046c2..00000000
--- a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-priority: 320
-help: Add this interface to a bridge group
-
-end: /opt/vyatta/sbin/vyatta-bridge.pl ${COMMIT_ACTION} $VAR(../../@).$VAR(../@)
diff --git a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/priority/node.def b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/priority/node.def
deleted file mode 100644
index be0ff479..00000000
--- a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/bridge-group/priority/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Bridge port priority
-syntax:expression: $VAR(@) >= 0 &&$VAR(@) < 64; "Port priority must be between 0-63"
-val_help: u32:0-63; Bridge port priority
diff --git a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/bridge/node.def b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/bridge/node.def
deleted file mode 100644
index 0d1f16e2..00000000
--- a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/bridge/node.def
+++ /dev/null
@@ -1,9 +0,0 @@
-type: txt
-
-help: Bridge group interface
-
-commit:expression: exec \
- "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bridge"
-
-allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=bridge
-
diff --git a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/cost/node.def b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/cost/node.def
deleted file mode 100644
index 243747b9..00000000
--- a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/cost/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Path cost for this port
-syntax:expression: $VAR(@) >= 1 && $VAR(@) < 65536 ; "Bridge cost value must be between 1 and 65535"
-val_help: u32:1-65535; Path cost value for Spanning Tree Protocol
diff --git a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/node.def
deleted file mode 100644
index a2f2ae42..00000000
--- a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-priority: 320
-help: Add this interface to a bridge group
-
-end: /opt/vyatta/sbin/vyatta-bridge.pl ${COMMIT_ACTION} $VAR(../../../@).$VAR(../../@).$VAR(../@)
diff --git a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/priority/node.def b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/priority/node.def
deleted file mode 100644
index be0ff479..00000000
--- a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/bridge-group/priority/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Bridge port priority
-syntax:expression: $VAR(@) >= 0 &&$VAR(@) < 64; "Port priority must be between 0-63"
-val_help: u32:0-63; Bridge port priority
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/bridge/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/bridge/node.def
deleted file mode 100644
index 0d1f16e2..00000000
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/bridge/node.def
+++ /dev/null
@@ -1,9 +0,0 @@
-type: txt
-
-help: Bridge group interface
-
-commit:expression: exec \
- "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bridge"
-
-allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=bridge
-
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/cost/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/cost/node.def
deleted file mode 100644
index 243747b9..00000000
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/cost/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Path cost for this port
-syntax:expression: $VAR(@) >= 1 && $VAR(@) < 65536 ; "Bridge cost value must be between 1 and 65535"
-val_help: u32:1-65535; Path cost value for Spanning Tree Protocol
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def
deleted file mode 100644
index dfd046c2..00000000
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-priority: 320
-help: Add this interface to a bridge group
-
-end: /opt/vyatta/sbin/vyatta-bridge.pl ${COMMIT_ACTION} $VAR(../../@).$VAR(../@)
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/priority/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/priority/node.def
deleted file mode 100644
index be0ff479..00000000
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/priority/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Bridge port priority
-syntax:expression: $VAR(@) >= 0 &&$VAR(@) < 64; "Port priority must be between 0-63"
-val_help: u32:0-63; Bridge port priority
diff --git a/templates/interfaces/loopback/node.def b/templates/interfaces/loopback/node.def
deleted file mode 100644
index 69778aad..00000000
--- a/templates/interfaces/loopback/node.def
+++ /dev/null
@@ -1,11 +0,0 @@
-tag:
-priority: 300
-type: txt
-help: Loopback interface name
-syntax:expression: pattern $VAR(@) "^lo$" ; "name must be lo"
-val_help: lo: Loopback interface name
-
-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 98788814..00000000
--- a/templates/interfaces/loopback/node.tag/address/node.def
+++ /dev/null
@@ -1,11 +0,0 @@
-multi:
-type: ipv4net,ipv6net
-val_help: ipv4net; IPv4 address and prefix length
-val_help: ipv6net; IPv6 address and prefix length
-help: IP address
-
-syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
-
-create: sudo /opt/vyatta/sbin/vyatta-address add $VAR(../@) $VAR(@)
-
-delete: sudo /opt/vyatta/sbin/vyatta-address delete $VAR(../@) $VAR(@)
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 c6d2789d..00000000
--- a/templates/interfaces/loopback/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/tunnel/node.def b/templates/interfaces/tunnel/node.def
index de5431a3..d42f6560 100644
--- a/templates/interfaces/tunnel/node.def
+++ b/templates/interfaces/tunnel/node.def
@@ -35,6 +35,9 @@ commit:expression: (!(pattern $VAR(./local-ip/@) ".*:.*") && $VAR(./encapsulatio
commit:expression: (!(pattern $VAR(./address/@@) ".*:.*") && $VAR(./encapsulation/@) == "gre" && $VAR(./remote-ip/) == "") || \
$VAR(./encapsulation/@) != "gre" || ($VAR(./encapsulation/@) == "gre" && $VAR(./remote-ip/) != ""); "IPv6 addresses ($VAR(./address/@@)) are forbidden for mGRE tunnels."
+commit:expression: !($VAR(./encapsulation/@) == "gre" && ((pattern $VAR(./local-ip/@@) ".*:.*") || (pattern $VAR(./remote-ip/@@) ".*:.*"))); \
+ "Using IPv6 address in local-ip or remote-ip is not possible with \"encapsulation gre\". Use \"encapsulation ip6gre\" instead."
+
create:
if [ $VAR(./encapsulation/@) == gre ] && [ -z $VAR(./remote-ip/) ]; then
sudo invoke-rc.d opennhrp.init start;
@@ -48,7 +51,7 @@ create:
LIP=$(/opt/vyatta/sbin/vyatta-dhcp-helper.pl --interface=$VAR(./dhcp-interface/@) --want=local)
fi
case "$VAR(./encapsulation/@)" in
- "gre" | "ipip" | "sit")
+ "gre" | "ipip" | "sit" | "ip6gre")
if [ -n "$VAR(./parameters/ip/bridge-group/)" ] ; then
echo "interfaces tunnel $VAR(@): Tunnel encapsulation type must be gre-bridge if a bridge group is defined";
exit 1;
@@ -68,6 +71,8 @@ create:
fi
if [ "$VAR(./encapsulation/@)" == "gre" ] && [ -z $VAR(./remote-ip/) ]; then
sudo ip tunnel add $VAR(@) local $LIP mode gre $KEY $TTL $TOS
+ elif [ "$VAR(./encapsulation/@)" == "ip6gre" ] && [ -z $VAR(./remote-ip/) ]; then
+ sudo ip tunnel add $VAR(@) local $LIP mode ip6gre $KEY $TTL $TOS
elif [ "$VAR(./encapsulation/@)" == "sit" ] && [ -n "$VAR(./6rd-prefix/@)" ]; then
if [ -n "$VAR(./6rd-relay-prefix/@)" ]; then
RP="6rd-relay_prefix $VAR(./6rd-relay-prefix/@)"
@@ -77,7 +82,7 @@ create:
else
sudo ip tunnel add $VAR(@) local $LIP remote $VAR(./remote-ip/@) mode $VAR(./encapsulation/@) $KEY $TTL $TOS
fi
- if [ -z "`ip tunnel show | grep $VAR(@)`" ]; then
+ if [ -z "`ip tunnel show | grep $VAR(@)`" ] && [ -z "`ip -6 tunnel show | grep $VAR(@)`" ]; then
echo interfaces tunnel $VAR(@): error creating tunnel interface
exit 1
fi
diff --git a/templates/interfaces/tunnel/node.tag/encapsulation/node.def b/templates/interfaces/tunnel/node.tag/encapsulation/node.def
index c8d0c7c2..b8f38c0a 100644
--- a/templates/interfaces/tunnel/node.tag/encapsulation/node.def
+++ b/templates/interfaces/tunnel/node.tag/encapsulation/node.def
@@ -2,8 +2,8 @@ type: txt
help: Encapsulation of this tunnel interface [REQUIRED]
syntax:expression: ((pattern $VAR(@) "^[-a-zA-Z0-9_]+$") && \
- ($VAR(@) in "gre", "gre-bridge", "ipip", "sit", "ipip6", "ip6ip6"; \
- "Must be (gre gre-bridge ipip sit ipip6 ip6ip6)\n"))
+ ($VAR(@) in "gre", "gre-bridge", "ipip", "sit", "ipip6", "ip6ip6", "ip6gre"; \
+ "Must be (gre gre-bridge ipip sit ipip6 ip6ip6 ip6gre)\n"))
create:expression: "true"
update:expression: "false" ; \
@@ -15,3 +15,4 @@ val_help: ipip; IP in IP encapsulation
val_help: sit; Simple Internet Transition encapsulation
val_help: ipip6; IP in IP6 encapsulation
val_help: ip6ip6; IP6 in IP6 encapsulation
+val_help: ip6gre; GRE over IPv6 network
diff --git a/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/bridge/node.def b/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/bridge/node.def
deleted file mode 100644
index 84d2c983..00000000
--- a/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/bridge/node.def
+++ /dev/null
@@ -1,20 +0,0 @@
-type: txt
-help: Bridge group interface
-allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=bridge
-commit:expression: exec \
- "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bridge"
-commit:expression: $VAR(../../../../encapsulation/@) == "gre-bridge"; "tunnel encapsulation type must be gre-bridge"
-create:
- # TODO: need to add logic for update as we need to remove the interface first.
- if [ "$(ip link show $VAR(../../../../@) | grep ether)" ]; then
- sudo brctl addif $VAR(@) $VAR(../../../../@) ||
- echo interfaces tunnel $VAR(../../../../@) bridge-group bridge $VAR(@): error adding interface to bridge
- else
- echo interfaces tunnel $VAR(../../../../@) bridge-group bridge $VAR(@): tunnel encapsulation type must be gre-bridge
- exit 1
- fi
-delete: if [ -d /sys/class/net/$VAR(@) ]; then
- sudo brctl delif $VAR(@) $VAR(../../../../@)
- else
- exit 0
- fi
diff --git a/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/cost/node.def b/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/cost/node.def
deleted file mode 100644
index 243747b9..00000000
--- a/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/cost/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Path cost for this port
-syntax:expression: $VAR(@) >= 1 && $VAR(@) < 65536 ; "Bridge cost value must be between 1 and 65535"
-val_help: u32:1-65535; Path cost value for Spanning Tree Protocol
diff --git a/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/node.def b/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/node.def
deleted file mode 100644
index 663979dd..00000000
--- a/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Add this interface to a bridge group
diff --git a/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/priority/node.def b/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/priority/node.def
deleted file mode 100644
index be0ff479..00000000
--- a/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/priority/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: u32
-help: Bridge port priority
-syntax:expression: $VAR(@) >= 0 &&$VAR(@) < 64; "Port priority must be between 0-63"
-val_help: u32:0-63; Bridge port priority
diff --git a/templates/interfaces/vxlan/node.def b/templates/interfaces/vxlan/node.def
deleted file mode 100644
index bb9d1b89..00000000
--- a/templates/interfaces/vxlan/node.def
+++ /dev/null
@@ -1,68 +0,0 @@
-tag:
-priority: 460
-type: txt
-help: Virtual eXtensible LAN interface
-val_help: <vxlanN>; VXLAN interface name
-syntax:expression: pattern $VAR(@) "vxlan[0-9]+$"
-
-commit:expression: $VAR(./vni/) != ""; \
- "Must configure vxlan vni for $VAR(@)"
-
-begin:
- [ -d /sys/module/vxlan ] || sudo modprobe vxlan
-
-
-create:
- if [ -e /sys/class/net/$VAR(@) ]; then
- echo "VXLAN interface \"$VAR(@)\" already exists."
- exit 1
- fi
-
- VXLAN_GROUP=""
- VXLAN_VNI="id $VAR(./vni/@)"
- VXLAN_TTL="ttl 16"
- VXLAN_PORT="dstport 0"
-
- if [ ! $VAR(./link/) == "" ]; then
- VXLAN_DEV="dev $VAR(./link/@)"
- fi
-
- if [ ! $VAR(./group/) == "" ]; then
- VXLAN_GROUP="group $VAR(./group/@)"
- if [ -z "$VXLAN_DEV" ]; then
- echo "For multicast VXLAN, link (network interface) must be configured"
- exit 1
- fi
- fi
-
- if [ ! $VAR(./remote/) == "" ]; then
- VXLAN_GROUP="remote $VAR(./remote/@)"
- fi
-
- if [ -z "$VXLAN_GROUP" ]; then
- echo "group or remote must be configured."
- exit 1
- fi
-
- if [ ! $VAR(./remote-port/) == "" ]; then
- VXLAN_PORT="dstport $VAR(./remote-port/@)"
- fi
-
- sudo ip link add name $VAR(@) type vxlan \
- $VXLAN_VNI $VXLAN_GROUP $VXLAN_TTL $VXLAN_DEV $VXLAN_PORT
- sudo ip link set $VAR(@) up
-
- touch /tmp/vxlan-$VAR(@)-create
-
-delete:
- if [ ! -e /sys/class/net/$VAR(@) ]; then
- echo "VXLAN interface \"$VAR(@)\" does not exist."
- else
- sudo ip link del dev $VAR(@)
- fi
-
-
-end:
- if [ -e /tmp/vxlan-$VAR(@)-create ]; then
- rm /tmp/vxlan-$VAR(@)-create
- fi
diff --git a/templates/interfaces/vxlan/node.tag/address/node.def b/templates/interfaces/vxlan/node.tag/address/node.def
deleted file mode 100644
index 3cf32ef7..00000000
--- a/templates/interfaces/vxlan/node.tag/address/node.def
+++ /dev/null
@@ -1,18 +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(../@)"
-
-create: sudo /opt/vyatta/sbin/vyatta-address add $VAR(../@) $VAR(@)
-
-delete: sudo /opt/vyatta/sbin/vyatta-address delete $VAR(../@) $VAR(@)
-
-allowed: echo "dhcp dhcpv6 <>"
-
-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/vxlan/node.tag/description/node.def b/templates/interfaces/vxlan/node.tag/description/node.def
deleted file mode 100644
index 7d88db80..00000000
--- a/templates/interfaces/vxlan/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/vxlan/node.tag/group/node.def b/templates/interfaces/vxlan/node.tag/group/node.def
deleted file mode 100644
index a3bae7e3..00000000
--- a/templates/interfaces/vxlan/node.tag/group/node.def
+++ /dev/null
@@ -1,9 +0,0 @@
-type: ipv4
-help: Multicast group address for this VXLAN interface
-val_help: ipv4; Multicast group address for this VXLAN
-
-update:
- if [ ! -e /tmp/vxlan-$VAR(../@)-create ]; then
- echo "Chainging group requires delete/create this vxlan interface"
- exit 1
- fi
diff --git a/templates/interfaces/vxlan/node.tag/ip/arp-cache-timeout/node.def b/templates/interfaces/vxlan/node.tag/ip/arp-cache-timeout/node.def
deleted file mode 100644
index 4441914c..00000000
--- a/templates/interfaces/vxlan/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/vxlan/node.tag/ip/enable-proxy-arp/node.def b/templates/interfaces/vxlan/node.tag/ip/enable-proxy-arp/node.def
deleted file mode 100644
index ae7ba09a..00000000
--- a/templates/interfaces/vxlan/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/vxlan/node.tag/link/node.def b/templates/interfaces/vxlan/node.tag/link/node.def
deleted file mode 100644
index d21c7d98..00000000
--- a/templates/interfaces/vxlan/node.tag/link/node.def
+++ /dev/null
@@ -1,10 +0,0 @@
-type: txt
-help: Underlay device name of this VXLAN interface
-allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all && echo default
-val_help:<interface>; Interface to be used as underlay of VXLAN interface
-
-update:
- if [ ! -e /tmp/vxlan-$VAR(../@)-create ]; then
- echo "Chainging dev requires delete/create this vxlan interface"
- exit 1
- fi
diff --git a/templates/interfaces/vxlan/node.tag/mtu/node.def b/templates/interfaces/vxlan/node.tag/mtu/node.def
deleted file mode 100644
index 9c213a91..00000000
--- a/templates/interfaces/vxlan/node.tag/mtu/node.def
+++ /dev/null
@@ -1,17 +0,0 @@
-type: u32
-priority: 461
-help: Maximum Transmission Unit (MTU)
-syntax:expression: $VAR(@) >= 1450 && $VAR(@) <= 9000; "Must be between 1450-9000"
-val_help: u32:1450-9000; Maximum Transmission Unit (MTU)
-
-update:
- if [ -d /sys/class/net/$VAR(../@) ] ; then
- if [ "$VAR(@)" -lt "1500" ]; then
- echo "WARNING: RFC7348 recommends VXLAN tunnels preserve a 1500 byte MTU."
- fi
- sudo ip link set $VAR(../@) mtu $VAR(@)
- fi
-delete:
- if [ -d /sys/class/net/$VAR(../@) ] ; then
- sudo ip link set $VAR(../@) mtu 1500
- fi
diff --git a/templates/interfaces/vxlan/node.tag/remote-port/node.def b/templates/interfaces/vxlan/node.tag/remote-port/node.def
deleted file mode 100644
index c1b4f672..00000000
--- a/templates/interfaces/vxlan/node.tag/remote-port/node.def
+++ /dev/null
@@ -1,11 +0,0 @@
-type: u32
-help: Remote port for this VXLAN tunnel
-val_help: u32:1-65535; Numeric IP port
-syntax:expression: $VAR(@) > 0 && $VAR(@) < 65536;
- "Port must be between 1 and 65535"
-
-update:
- if [ ! -e /tmp/vxlan-$VAR(../@)-create ]; then
- echo "Changing remote port requires delete/create this vxlan interface"
- exit 1
- fi
diff --git a/templates/interfaces/vxlan/node.tag/remote/node.def b/templates/interfaces/vxlan/node.tag/remote/node.def
deleted file mode 100644
index 5e789c48..00000000
--- a/templates/interfaces/vxlan/node.tag/remote/node.def
+++ /dev/null
@@ -1,9 +0,0 @@
-type: ipv4
-help: Remote address of VXLAN tunnel
-val_help: ipv4; Remote address of this VXLAN tunnel
-
-update:
- if [ ! -e /tmp/vxlan-$VAR(../@)-create ]; then
- echo "Changing remote requires delete/create this vxlan interface"
- exit 1
- fi
diff --git a/templates/interfaces/vxlan/node.tag/vni/node.def b/templates/interfaces/vxlan/node.tag/vni/node.def
deleted file mode 100644
index cc54b4b8..00000000
--- a/templates/interfaces/vxlan/node.tag/vni/node.def
+++ /dev/null
@@ -1,10 +0,0 @@
-type: u32
-help: Virtual network identifier [REQUIRED]
-syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 16777216; "Must be between 0-16777216"
-val_help: u32: 0-16777214; Virtual network identifier of this VXLAN interface [REQUIRED]
-
-update:
- if [ ! -e /tmp/vxlan-$VAR(../@)-create ]; then
- echo "Chainging vni requires delete/create this vxlan interface"
- exit 1
- fi