From ce0724444cca9f005925786d8523832e10357430 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 23 Nov 2010 16:15:57 -0800 Subject: Remove check function from keepalived perl script No longer need check-vip option since the type checking is done in template --- scripts/keepalived/vyatta-keepalived.pl | 16 ---------------- .../vrrp/vrrp-group/node.tag/virtual-address/node.def | 4 ---- .../vrrp/vrrp-group/node.tag/virtual-address/node.def | 4 ---- .../vrrp/vrrp-group/node.tag/virtual-address/node.def | 4 ---- .../vrrp/vrrp-group/node.tag/virtual-address/node.def | 4 ---- 5 files changed, 32 deletions(-) diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl index ebb8307c..651832b1 100755 --- a/scripts/keepalived/vyatta-keepalived.pl +++ b/scripts/keepalived/vyatta-keepalived.pl @@ -26,7 +26,6 @@ use lib "/opt/vyatta/share/perl5/"; use Vyatta::Config; use Vyatta::Keepalived; -use Vyatta::TypeChecker; use Vyatta::Interface; use Vyatta::ConntrackSync; use Vyatta::Misc; @@ -514,21 +513,6 @@ if ( $action eq "delete" ) { exit 0; } -if ( $action eq "check-vip" ) { - if ( !defined $vrrp_vip ) { - print "must include the virtual-address to check"; - exit 1; - } - my $rc = 1; - if ( $vrrp_vip =~ /\// ) { - $rc = Vyatta::TypeChecker::validateType( 'ipv4net', $vrrp_vip, 1 ); - } else { - $rc = Vyatta::TypeChecker::validateType( 'ipv4', $vrrp_vip, 1 ); - } - exit 1 if !$rc; - exit 0; -} - if ( $action eq "list-vrrp-intf" ) { my @intfs = list_vrrp_intf(); print join( ' ', @intfs ); diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index d86675ec..676bf8d3 100644 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -5,9 +5,5 @@ help: Virtual address [REQUIRED] syntax:expression: exec " if [[ '$VAR(@)' == '*/' ]]; then /opt/vyatta/sbin/valid_address $VAR(@); fi" -syntax:expression: exec "/opt/vyatta/sbin/vyatta-keepalived.pl \ - --vrrp-action='check-vip' --vip='$VAR(@)' "\ - ; "Invalid virtual-address [$VAR(@)] for vrrp-group $VAR(../@)" - val_help: ipv4; Virtual IP address (up to 20 per group) val_help: ipv4net; Virtual IP address with prefix (up to 20 per group) diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index d86675ec..676bf8d3 100644 --- a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -5,9 +5,5 @@ help: Virtual address [REQUIRED] syntax:expression: exec " if [[ '$VAR(@)' == '*/' ]]; then /opt/vyatta/sbin/valid_address $VAR(@); fi" -syntax:expression: exec "/opt/vyatta/sbin/vyatta-keepalived.pl \ - --vrrp-action='check-vip' --vip='$VAR(@)' "\ - ; "Invalid virtual-address [$VAR(@)] for vrrp-group $VAR(../@)" - val_help: ipv4; Virtual IP address (up to 20 per group) val_help: ipv4net; Virtual IP address with prefix (up to 20 per group) diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index d86675ec..676bf8d3 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -5,9 +5,5 @@ help: Virtual address [REQUIRED] syntax:expression: exec " if [[ '$VAR(@)' == '*/' ]]; then /opt/vyatta/sbin/valid_address $VAR(@); fi" -syntax:expression: exec "/opt/vyatta/sbin/vyatta-keepalived.pl \ - --vrrp-action='check-vip' --vip='$VAR(@)' "\ - ; "Invalid virtual-address [$VAR(@)] for vrrp-group $VAR(../@)" - val_help: ipv4; Virtual IP address (up to 20 per group) val_help: ipv4net; Virtual IP address with prefix (up to 20 per group) diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index d86675ec..676bf8d3 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -5,9 +5,5 @@ help: Virtual address [REQUIRED] syntax:expression: exec " if [[ '$VAR(@)' == '*/' ]]; then /opt/vyatta/sbin/valid_address $VAR(@); fi" -syntax:expression: exec "/opt/vyatta/sbin/vyatta-keepalived.pl \ - --vrrp-action='check-vip' --vip='$VAR(@)' "\ - ; "Invalid virtual-address [$VAR(@)] for vrrp-group $VAR(../@)" - val_help: ipv4; Virtual IP address (up to 20 per group) val_help: ipv4net; Virtual IP address with prefix (up to 20 per group) -- cgit v1.2.3