From b0bdb6426dbdd7fe8c5702f6dab77e8552288820 Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Mon, 17 Sep 2001 01:35:25 +0000 Subject: [PATCH] added 'host' as another DNS test command --- src/lib/Spong/Network/plugins/check_dns | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Spong/Network/plugins/check_dns b/src/lib/Spong/Network/plugins/check_dns index eab9eb6..e8dc8fb 100755 --- a/src/lib/Spong/Network/plugins/check_dns +++ b/src/lib/Spong/Network/plugins/check_dns @@ -5,7 +5,7 @@ $PLUGINS{'dns'} = \&check_dns; # and ask that server to resolve it's own name. If it can do that, then we # assume it is ok - If it can't then something is wrong. -# $Id: check_dns,v 1.3 2001/08/07 18:41:05 sljohnson Exp $ +# $Id: check_dns,v 1.4 2001/09/17 01:35:25 sljohnson Exp $ sub check_dns { my( $host ) = @_; @@ -14,6 +14,7 @@ sub check_dns { my $cmd; if ( $DNSCMD =~ /nslookup/ ) { $cmd = "$DNSCMD -type=A $host $host >/dev/null 2>&1" } elsif ( $DNSCMD =~ /dig/ ) { $cmd = "$DNSCMD \@$host $host a >/dev/null 2>&1"; } + elsif ( $DNSCMD =~ /host/ ) { $cmd = "$DNSCMD $host $host >/dev/null 2>&1"; } else { return ( "yellow", "\$DNSCMD variable is not set to a proper value", "Valid values for the \$DNSCMD variable are 'nslookup'" . " or 'dig', with the full path name to the command. This" . -- 2.30.2