summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoretienne2006-09-01 11:40:32 +0000
committeretienne2006-09-01 11:40:32 +0000
commitfa19c3e2b28b2239666c3379c267a6835cd86c6f (patch)
tree33e177587fbe2c06c9830e8d3afcb7856c0fddac /src
parent4c24c7e6d9c0835a0b07061e998349ed5e7e52ae (diff)
downloadivymon-fa19c3e2b28b2239666c3379c267a6835cd86c6f.zip
ivymon-fa19c3e2b28b2239666c3379c267a6835cd86c6f.tar.gz
ivymon-fa19c3e2b28b2239666c3379c267a6835cd86c6f.tar.bz2
ivymon-fa19c3e2b28b2239666c3379c267a6835cd86c6f.tar.xz
Compatible with Ivy version 4.18 (and with version 1.40 based on cvs revision)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/ivymon13
1 files changed, 10 insertions, 3 deletions
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;