diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-06-23 20:26:25 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-06-23 20:26:34 +0200 |
commit | a8f667363ccbfe22ded883a87e3ac0601c6859c6 (patch) | |
tree | d7cab0dbaf764923cb91f7aa178d6d5265691d4d | |
parent | 5b78f249c8c51e93062fdbabe4b4f5f81249ac4f (diff) | |
download | vyatta-cfg-system-a8f667363ccbfe22ded883a87e3ac0601c6859c6.tar.gz vyatta-cfg-system-a8f667363ccbfe22ded883a87e3ac0601c6859c6.zip |
tunnel: T2633: migrate to vyos-1x
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | debian/control | 3 | ||||
-rwxr-xr-x | gen-interface-templates.pl | 113 | ||||
-rw-r--r-- | interface-templates/ip/disable-arp-filter/node.def | 3 | ||||
-rw-r--r-- | interface-templates/ip/enable-arp-accept/node.def | 3 | ||||
-rw-r--r-- | interface-templates/ip/enable-arp-announce/node.def | 3 | ||||
-rw-r--r-- | interface-templates/ip/enable-arp-ignore/node.def | 3 |
7 files changed, 1 insertions, 131 deletions
diff --git a/Makefile.am b/Makefile.am index 9e4fe0cf..2c3c9ae2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -123,10 +123,6 @@ curver_DATA += cfg-version/nat@5 cpiop = find . ! -regex '\(.*~\|.*\.bak\|.*\.swp\|.*\#.*\#\)' -print0 | \ cpio -0pd -all-local: - rm -rf $(gentmpdir) - ./gen-interface-templates.pl $(gentmpdir) - clean-local: rm -rf $(gentmpdir) diff --git a/debian/control b/debian/control index 9f9b70ee..694728cb 100644 --- a/debian/control +++ b/debian/control @@ -50,8 +50,7 @@ Depends: adduser, grub-efi-amd64-bin, dosfstools, gdisk, - vyatta-biosdevname, - ${arch:Depends} + vyatta-biosdevname Pre-Depends: bash-completion Suggests: util-linux (>= 2.13-5), net-tools, diff --git a/gen-interface-templates.pl b/gen-interface-templates.pl deleted file mode 100755 index 6ba649e3..00000000 --- a/gen-interface-templates.pl +++ /dev/null @@ -1,113 +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. -# -# This code was originally developed by Vyatta, Inc. -# Portions created by Vyatta are Copyright (C) 2009 Vyatta, Inc. -# All Rights Reserved. -# -# Author: Stephen Hemminger -# Date: March 2009 -# Description: Script to automatically generate per-interface arp options -# templates. -# -# **** End License **** - -use strict; -use warnings; - -# set DEBUG in environment to test script -my $debug = $ENV{'DEBUG'}; - -# Mapping from configuration level to ifname used AT THAT LEVEL -my %interface_hash = ( - 'tunnel/node.tag' => '$VAR(@)', -); - -# Hash table to check if the priority needs to set @ root -# of the node.def which is generated. -my %interface_prio = (); - -sub gen_template { - my ( $inpath, $outpath, $ifname, $gen_prio, $prio, $depth ) = @_; - - print $outpath, "\n" if ($debug); - opendir my $d, $inpath - or die "Can't open: $inpath:$!"; - - # walk through sample templates - foreach my $name ( grep { !/^\./ } readdir $d ) { - my $in = "$inpath/$name"; - my $out = "$outpath/$name"; - - # recurse into subdirectory - if ( -d $in ) { - my $subif = $ifname; - $subif =~ s#@\)#../@)#g if ($name ne 'node.tag'); - - ( -d $out ) - or mkdir($out) - or die "Can't create $out: $!"; - - gen_template( $in, $out, $subif, $gen_prio, $prio, $depth+1); - next; - } - - print "in: $in out: $out\n" if ($debug); - open my $inf, '<', $in or die "Can't open $in: $!"; - open my $outf, '>', $out or die "Can't open $out: $!"; - - # For the top node.tag create the priority tag. - if ($name eq 'node.def' && $gen_prio == 1 && $depth <= 1) { - print $outf "priority: $prio\n"; - } - while ( my $line = <$inf> ) { - $line =~ s#\$IFNAME#$ifname#; - print $outf $line; - } - close $inf; - close $outf or die "Close error $out:$!"; - } - closedir $d; -} - -sub mkdir_p { - my $path = shift; - - return 1 if ( mkdir($path) ); - - my $pos = rindex( $path, "/" ); - return unless $pos != -1; - return unless mkdir_p( substr( $path, 0, $pos ) ); - return mkdir($path); -} - -die "Usage: $0 output_directory\n" if ($#ARGV < 0); - -my $outdir = $ARGV[0]; - -foreach my $if_tree ( keys %interface_hash ) { - my $inpath = "interface-templates"; - my $outpath = "$outdir/interfaces/$if_tree"; - ( -d $outpath ) - or mkdir_p($outpath) - or die "Can't create $outpath:$!"; - - my $gen_prio = 0; - my $prio = 0; - $gen_prio = 1 if (exists $interface_prio{ $if_tree }); - if ($gen_prio == 1) { - $prio = $interface_prio{ $if_tree }; - } - - gen_template( $inpath, $outpath, $interface_hash{$if_tree}, - $gen_prio, $prio, 0 ); -} diff --git a/interface-templates/ip/disable-arp-filter/node.def b/interface-templates/ip/disable-arp-filter/node.def deleted file mode 100644 index e41b0d8e..00000000 --- a/interface-templates/ip/disable-arp-filter/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Disable arp-filter on this interface -create:expression: "sudo sh -c \"echo 0 > /proc/sys/net/ipv4/conf/$IFNAME/arp_filter\" " -delete:expression: "sudo sh -c \"echo 1 > /proc/sys/net/ipv4/conf/$IFNAME/arp_filter\" " diff --git a/interface-templates/ip/enable-arp-accept/node.def b/interface-templates/ip/enable-arp-accept/node.def deleted file mode 100644 index d5413737..00000000 --- a/interface-templates/ip/enable-arp-accept/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Enable arp-accept on this interface -create:expression: "sudo sh -c \"echo 1 > /proc/sys/net/ipv4/conf/$IFNAME/arp_accept\" " -delete:expression: "sudo sh -c \"echo 0 > /proc/sys/net/ipv4/conf/$IFNAME/arp_accept\" " diff --git a/interface-templates/ip/enable-arp-announce/node.def b/interface-templates/ip/enable-arp-announce/node.def deleted file mode 100644 index fde37ce5..00000000 --- a/interface-templates/ip/enable-arp-announce/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Enable arp-announce on this interface -create:expression: "sudo sh -c \"echo 1 > /proc/sys/net/ipv4/conf/$IFNAME/arp_announce\" " -delete:expression: "sudo sh -c \"echo 0 > /proc/sys/net/ipv4/conf/$IFNAME/arp_announce\" " diff --git a/interface-templates/ip/enable-arp-ignore/node.def b/interface-templates/ip/enable-arp-ignore/node.def deleted file mode 100644 index bd6aee52..00000000 --- a/interface-templates/ip/enable-arp-ignore/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Enable arp-ignore on this interface -create:expression: "sudo sh -c \"echo 1 > /proc/sys/net/ipv4/conf/$IFNAME/arp_ignore\" " -delete:expression: "sudo sh -c \"echo 0 > /proc/sys/net/ipv4/conf/$IFNAME/arp_ignore\" " |