--- ocsinventory-agent-1.1.1.orig/Changes
+++ ocsinventory-agent-1.1.1/Changes
@@ -1,5 +1,10 @@
 Revision history for Ocsinventory::Agent
 
+1.1.2    Sun, 27 Dec 2009 17:24:43 +0100
+       * Avoid problem with dmidecode -V output on RHEL3.9 (Remi COLLET)
+       * Fix internal --delaytime handling. That's seconds, not hours!
+       * Download.pm: improve a error message
+
 1.1.1    Mon, 21 Dec 2009 22:38:12 +0100
        * NETWORKS/VIRTUALDEV should be 1 or 0
        * FreeBSD: Fix CPU detection (David DURIEUX)
--- ocsinventory-agent-1.1.1.orig/META.yml
+++ ocsinventory-agent-1.1.1/META.yml
@@ -28,4 +28,4 @@
   perl: 5.6.0
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 1.1.1
+version: 1.1.2
--- ocsinventory-agent-1.1.1.orig/lib/Ocsinventory/Agent/Config.pm
+++ ocsinventory-agent-1.1.1/lib/Ocsinventory/Agent/Config.pm
@@ -3,7 +3,7 @@
 use strict;
 use Getopt::Long;
 
-our $VERSION = '1.1.1';
+our $VERSION = '1.1.2';
 my $basedir = '';
 my $default = {
   'daemon'    =>  0,
@@ -181,7 +181,7 @@
 #  print STDERR "\t-x --xml            write output in a xml file ($self->{config}{xml})\n";
   print STDERR "\t--nosoft            DEPRECATED, use --nosoftware instead\n";
   print STDERR "\t--nosoftware        do not return installed software list (".$self->{config}{nosoftware}.")\n";
-  print STDERR "\t--delaytime	        set a max delay time if no PROLOG_FREQ is set (".$self->{config}{delaytime}.")\n";
+  print STDERR "\t--delaytime	      set a max delay time (in second) if no PROLOG_FREQ is set (".$self->{config}{delaytime}.")\n";
   print STDERR "\t--scan-homedirs     permit to scan home user directories (".$self->{config}{scanhomedirs}.")\n" ;
 
   print STDERR "\n";
--- ocsinventory-agent-1.1.1.orig/lib/Ocsinventory/Agent/XML/Response/Prolog.pm
+++ ocsinventory-agent-1.1.1/lib/Ocsinventory/Agent/XML/Response/Prolog.pm
@@ -84,10 +84,10 @@
     my $time;
     if( $self->{prologFreqChanged} ){
         $logger->debug("Compute next_time file with random value");
-        $time  = time + int rand(($serverdelay?$serverdelay:$self->{config}->{delaytime})*3600);
+        $time  = time + int rand(($serverdelay?$serverdelay*3600:$self->{config}->{delaytime}));
     }
     else{
-        $time = time + ($serverdelay?$serverdelay:$self->{config}->{delaytime})*3600;
+        $time = time + ($serverdelay?$serverdelay*3600:$self->{config}->{delaytime});
     }
     utime $time,$time,$self->{config}->{next_timefile};
     
--- ocsinventory-agent-1.1.1.orig/lib/Ocsinventory/Agent/Option/Download.pm
+++ ocsinventory-agent-1.1.1/lib/Ocsinventory/Agent/Option/Download.pm
@@ -104,7 +104,8 @@
 				# Type of param
 				if($_->{'TYPE'} eq 'CONF'){
 					# Writing configuration
-					open FH, ">$opt_dir/config" or die("Cannot open/create config file");
+					open FH, ">$opt_dir/config" or die("Cannot open/create
+                        config file ($opt_dir/config)");
 					if(flock(FH, LOCK_EX)){
 						&log("Writing config file.");
 						print FH XMLout($_, RootName => 'CONF');
--- ocsinventory-agent-1.1.1.orig/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm
+++ ocsinventory-agent-1.1.1/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm
@@ -50,7 +50,7 @@
       return 1; 
   }
   if ( can_run ("dmidecode") ) { # 2.6 and under haven't -t parameter   
-    if ( `dmidecode -V` >= 2.7 ) {
+    if ( `dmidecode -V 2>/dev/null` >= 2.7 ) {
       return 1;
     }
   } 
