From fa19c3e2b28b2239666c3379c267a6835cd86c6f Mon Sep 17 00:00:00 2001 From: etienne Date: Fri, 1 Sep 2006 11:40:32 +0000 Subject: Compatible with Ivy version 4.18 (and with version 1.40 based on cvs revision) --- src/ivymon | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ivymon b/src/ivymon index 45d4fc2..ce538d1 100755 --- a/src/ivymon +++ b/src/ivymon @@ -257,7 +257,11 @@ if ($opt_bus) { $history = $opt_history if $opt_history; my $title; my $ivy_version = $Ivy::VERSION; -$ivy_version =~ s/Revision: //; +my $ivy_cvsrevision = 0; +if ($ivy_version =~ s/Revision: (.*)//) { + $ivy_version = $1; + $ivy_cvsrevision = 1; +} if ($ivy_port) { $title = "Ivymon v$VERSION ($ivy_port) - Ivy v$ivy_version"; } else { @@ -1091,9 +1095,12 @@ sub checkClientsStatus { my $status = $_[4]; my $host; my $regexp; - if ($ivy_version ge 1.40) { + my $newapi; + $newapi = 1 if (($ivy_cvsrevision == 1 and $ivy_version ge 1.40) or + ($ivy_cvsrevision == 0 and $ivy_version ge 4.18)); + if ($newapi) { $host = $_[5]; - $regexp = $_[6]; + $regexp = $_[6]; } else { $host = $_[5]; $regexp = $host; -- cgit v1.1