From 78e111940c711c83ed83e6e0d833d2f59dd95791 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Tue, 9 Feb 2016 07:02:04 -0500 Subject: Fix "Smartmatch is experimental" more easy. --- scripts/vyos-update-nhrp.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/vyos-update-nhrp.pl b/scripts/vyos-update-nhrp.pl index 2271bd1..c632b33 100644 --- a/scripts/vyos-update-nhrp.pl +++ b/scripts/vyos-update-nhrp.pl @@ -27,7 +27,6 @@ use POSIX; use File::Basename; use File::Compare; use NetAddr::IP; -use match::smart; use lib "/opt/vyatta/share/perl5/"; use Vyatta::Config; @@ -53,7 +52,7 @@ sub checkref { $config_nhrp_tun->setLevel("protocols nhrp tunnel"); my @nhrp_tunnels = $config_nhrp_tun->listNodes(); - if ($tun ~~ @nhrp_tunnels) { + if (any(@nhrp_tunnels) eq $tun) { print ("WARNING: Can't delete tunnel $tun, it is in use by NHRP config.\n"); exit 1; } @@ -105,7 +104,7 @@ sub configure_nhrp_tunnels { if (@nhrp_tunnels) { foreach my $nhrp_tunnel(@nhrp_tunnels) { - if ($nhrp_tunnel ~~ @tunnels) { + if (any(@tunnels) eq $nhrp_tunnel) { if ($config_tun->returnValue("$nhrp_tunnel encapsulation") eq "gre" && ! $config_tun->exists("$nhrp_tunnel remote-ip")) { my @conf_file = tunnel_config($nhrp_tunnel); open (my $fh,">>$conffile"); @@ -161,7 +160,7 @@ sub configure_nhrp_ipsec { my @ipsec_profile_tunnels = $config_ipsec_profile_tun->listNodes(); foreach my $ipsec_profile_tunnel(@ipsec_profile_tunnels) { - if ($ipsec_profile_tunnel ~~ @nhrp_tunnels) { + if (any(@nhrp_tunnels) eq $ipsec_profile_tunnel) { my @conf_file = ipsec_config($ipsec_profile, $ipsec_profile_tunnel); open (my $fh,">>$ipsecfile"); foreach (@conf_file) { -- cgit v1.2.3