diff --git a/pandora_agents/unix/ChangeLog b/pandora_agents/unix/ChangeLog
index aa14fcd4f0..448bc9e4af 100644
--- a/pandora_agents/unix/ChangeLog
+++ b/pandora_agents/unix/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-07  Sancho Lerena <slerena@artica.es>
+
+	* plugins/inventory: Fixed some problems with the plugin (for linux). Added
+	inventory for RPM systems.
+
 2009-12-03  Ramon Novoa  <rnovoa@artica.es>
 
 	* pandora_agent: Empty modules and plugins before loading a remote
diff --git a/pandora_agents/unix/plugins/inventory b/pandora_agents/unix/plugins/inventory
index 56d64e26b8..f524298707 100755
--- a/pandora_agents/unix/plugins/inventory
+++ b/pandora_agents/unix/plugins/inventory
@@ -135,19 +135,27 @@ sub get_software_module_data ($$) {
 	my ($name, $modules) = @_;
 
 	# Guess the current distribution
-	open (RELEASE_FILE, '< /etc/lsb-release') or return;
-	my $distrib_id = <RELEASE_FILE>;
-	last unless ($distrib_id =~ m/DISTRIB_ID\s*=\s*(\S+)/);
-	$distrib_id = $1;
+	my $distrib_id = "";
+
+	if ( -e "/etc/SuSE-release"){
+			$distrib_id = "SUSE";
+	} else {
+		open (RELEASE_FILE, '< /etc/lsb-release') or return;
+		$distrib_id = <RELEASE_FILE>;
+		last unless ($distrib_id =~ m/DISTRIB_ID\s*=\s*(\S+)/);
+		$distrib_id = $1;
+	}
 
 	# List installed programs
 	my @soft;
 	if ($distrib_id eq 'Ubuntu') {
 		@soft = `dpkg -l | grep ii`;
 	} else {
-		return;
+
+		@soft = `rpm -q -a --qf "ii\t%{NAME}\t%{VERSION}\t%{SUMMARY}\n"`;
 	}
 
+
 	# Parse data
 	foreach my $row (@soft) {
 		next unless ($row =~ /^ii\s+(\S+)\s+(\S+)\s+([^\n]+)/);
@@ -157,7 +165,6 @@ sub get_software_module_data ($$) {
 		$module{'version'} = $2;
 		$module{'description'} = $3;
 		$module{'_keys'} = ['program', 'version','description'];
-
 		push (@{$modules->{$name}}, \%module);
 	}
 }
@@ -191,9 +198,18 @@ if ($#ARGV < 0) {
 
 # Parse command line parameters
 my %enabled;
-my $enable_all = ($#ARGV > 0 ? 0 : 1);
-my $interval = shift (@ARGV);
-foreach my $module (@ARGV) {
+my $interval = 1;
+my $enable_all = 0;
+
+$interval = $ARGV[0];
+if ($#ARGV == 0){
+	$enable_all = 1;
+}
+
+foreach my $module (@ARGV) { 
+	if ($module eq "all"){
+		$enable_all = 1;
+	}
 	$enabled{$module} = 1;
 }