summaryrefslogtreecommitdiffstats
path: root/lib/Smokeping/probes/Curl.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Smokeping/probes/Curl.pm')
-rw-r--r--lib/Smokeping/probes/Curl.pm12
1 files changed, 5 insertions, 7 deletions
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;