From 15ce7b9d28dda1afb6b892c1e2a34e057f3fdb60 Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Mon, 15 Oct 2007 07:49:18 +0000 Subject: * fixed parsing of slaves statements in config file, broeken since I seemingly relaxed the hostname constraints. * removed all online testing from Curl and EchoPing probes --- lib/Smokeping/probes/Curl.pm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lib/Smokeping/probes/Curl.pm') diff --git a/lib/Smokeping/probes/Curl.pm b/lib/Smokeping/probes/Curl.pm index ee8541b..7328e35 100644 --- a/lib/Smokeping/probes/Curl.pm +++ b/lib/Smokeping/probes/Curl.pm @@ -202,16 +202,14 @@ sub test_usage { my $arghashref = $self->features; my %arghash = %$arghashref; - + my $curl_man = `$bin --manual`; for my $feature (keys %arghash) { - system("$bin $arghash{$feature} 1 0.0.0.1 >/dev/null 2>&1"); - if ($? == 2) { - push @unsupported, $feature; - $self->do_log("Note: your curl doesn't support the $feature feature (option $arghash{$feature}), disabling it"); - } + next if $curl_man =~ /\Q$arghash{$feature}/; + push @unsupported, $feature; + $self->do_log("Note: your curl doesn't support the $feature feature (option $arghash{$feature}), disabling it"); } map { delete $arghashref->{$_} } @unsupported; - if (`$bin -o /dev/null -w '<%{time_redirect}>\n' 0.0.0.1 2>&1` =~ /^<>/m) { + if ($curl_man !~ /\stime_redirect\s/) { $self->do_log("Note: your curl doesn't support the 'time_redirect' output variable; 'include_redirects' will not function."); } return; -- cgit v1.2.3-24-g4f1b