mirror of
https://abf.rosa.ru/djam/ocsinventory-agent.git
synced 2025-04-18 12:24:41 +00:00
19 lines
878 B
Diff
19 lines
878 B
Diff
diff -Naur -x '*~' Ocsinventory-Agent-1.1.2/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm Ocsinventory-Agent-1.1.2-fix-dmidecode-version-test/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm
|
|
--- Ocsinventory-Agent-1.1.2/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm 2010-01-03 16:04:59.000000000 +0100
|
|
+++ Ocsinventory-Agent-1.1.2-fix-dmidecode-version-test/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm 2010-05-27 13:51:24.597391924 +0200
|
|
@@ -44,13 +44,14 @@
|
|
##
|
|
|
|
use strict;
|
|
+use version;
|
|
|
|
sub check {
|
|
if ( can_run("zoneadm")){ # Is a solaris zone system capable ?
|
|
return 1;
|
|
}
|
|
if ( can_run ("dmidecode") ) { # 2.6 and under haven't -t parameter
|
|
- if ( `dmidecode -V 2>/dev/null` >= 2.7 ) {
|
|
+ if ( version->parse(`dmidecode -V 2>/dev/null`) >= version->parse('v2.7') ) {
|
|
return 1;
|
|
}
|
|
}
|