From 60dc941e778f09153cbcc9493391df85ba85686c Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Mon, 19 Jul 2010 08:52:24 -0700 Subject: [PATCH] Get version from -V flag --- heartbeat/index.cgi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/heartbeat/index.cgi b/heartbeat/index.cgi index 51094cff2..a376af05f 100755 --- a/heartbeat/index.cgi +++ b/heartbeat/index.cgi @@ -9,6 +9,10 @@ $heartbeat_version = undef; if ($config{'version'}) { $heartbeat_version = $config{'version'}; } +elsif (&backquote_command("($config{'heartbeat'} -V) &1") =~ + /(\S+)/) { + $heartbeat_version = $1; + } elsif (&foreign_check("software")) { &foreign_require("software", "software-lib.pl"); local @pinfo = &software::package_info("heartbeat");