summaryrefslogtreecommitdiff
path: root/scripts/vyatta-tunnel-cleanup
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2023-04-15 03:35:32 +0100
committerDaniil Baturin <daniil@baturin.org>2023-04-15 03:35:32 +0100
commit25b0a95af7f30e95fa62bfe91c142b51ceef2d84 (patch)
tree9162f5063559282597e875148347d1af1bc04d05 /scripts/vyatta-tunnel-cleanup
parent964e06bc3404b096d55e939b2bdb8d9c61a6a9b9 (diff)
downloadvyatta-cfg-system-25b0a95af7f30e95fa62bfe91c142b51ceef2d84.tar.gz
vyatta-cfg-system-25b0a95af7f30e95fa62bfe91c142b51ceef2d84.zip
T671: remove unused scripts
Diffstat (limited to 'scripts/vyatta-tunnel-cleanup')
-rwxr-xr-xscripts/vyatta-tunnel-cleanup30
1 files changed, 0 insertions, 30 deletions
diff --git a/scripts/vyatta-tunnel-cleanup b/scripts/vyatta-tunnel-cleanup
deleted file mode 100755
index b8a93244..00000000
--- a/scripts/vyatta-tunnel-cleanup
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /usr/bin/perl
-
-# This script gets run after tunnels have been deleted, it removes
-# the underlying tunnel link, if all tunnels of that type are gone.
-
-use strict;
-use warnings;
-use lib "/opt/vyatta/share/perl5";
-use Vyatta::Config;
-
-# encapsulations and module names
-my %encapsulation = (
- 'gre' => 'ip_gre',
- 'ipip' => 'ipip',
- 'sit' => 'sit',
-);
-
-# interface being deleted
-my $interface = $ARGV[0];
-
-# Create map of encapsulations still in use
-my $config = new Vyatta::Config;
-$config->setLevel("interfaces tunnel");
-
-my %tunnel;
-foreach my $tun ( $config->listEffectiveNodes() ) {
- my $mode = $config->returnEffectiveValue("$tun encapsulation");
- next if ($interface eq $tun); # don't count the one being deleted
- $tunnel{$mode} = 1;
-}