Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > by-pkgid > 4600e36867221e7b25edae93f646cf9f > files > 13

ocsng-1.0-0.3mdv2009.0.src.rpm

--- OCSNG_LINUX_AGENT_1.0-RC1/ocsinventory-client.pl.old	2006-01-23 23:00:51.078911292 +0100
+++ OCSNG_LINUX_AGENT_1.0-RC1/ocsinventory-client.pl	2006-01-23 23:02:42.853139250 +0100
@@ -726,8 +726,8 @@
 sub _inventory{
 	#dmidecode is embedded in order to read the smbios headers
 	#Getting the output
-	die localtime()." => Cannot find dmidecode\n" unless -e "/etc/ocsinventory-client/dmidecode";
-	@dmidecode=`/etc/ocsinventory-client/dmidecode`;
+	die localtime()." => Cannot find dmidecode\n" unless -e "/usr/sbin/dmidecode";
+	@dmidecode=`/usr/sbin/dmidecode`;
 	for (@dmidecode){s/^\s*(\S*)/$1/;}
 	#Begin of xml
 	$request{'QUERY'} = ['INVENTORY'];
@@ -891,19 +891,19 @@
 			#UPDATE#
 			#############################
 			#Put the binary content in memory
-			open DMI, "/etc/ocsinventory-client/dmidecode" 
+			open DMI, "/usr/sbin/dmidecode" 
 				or die "Cannot update dmidecode : $!\n";
 			undef $old;
 			while(<DMI>){
 				$old.=$_;
 			}
-			open DMI, ">/etc/ocsinventory-client/dmidecode";
+			open DMI, ">/usr/sbin/dmidecode";
 			#Writing the new data
 			print DMI $content;
 			close DMI;
 			#Testing the return value of dmidecode
-			if(system("/etc/ocsinventory-client/dmidecode > /dev/null")){
-				open DMI, ">/etc/ocsinventory-client/dmidecode"
+			if(system("/usr/sbin/dmidecode > /dev/null")){
+				open DMI, ">/usr/sbin/dmidecode"
 					or die "Cannot go back to the previous version : $!\n";
 				print DMI $old;
 				close DMI;
@@ -932,19 +932,19 @@
 			#UPDATE#
 			#############################
 			#Put the binary content in memory
-			open IPDISCOVER, "/etc/ocsinventory-client/ipdiscover" 
+			open IPDISCOVER, "/usr/sbin/ipdiscover" 
 				or die "Cannot update ipdiscover : $!\n";
 			undef $old;
 			while(<IPDISCOVER>){
 				$old.=$_;
 			}
-			open IPDISCOVER, ">/etc/ocsinventory-client/ipdiscover";
+			open IPDISCOVER, ">/usr/sbin/ipdiscover";
 			#Writing the new data
 			print IPDISCOVER $content;
 			close IPDISCOVER;
 			#Testing the return value of ipdiscover
-			if(system("/etc/ocsinventory-client/ipdiscover > /dev/null")){
-				open IPDISCOVER, ">/etc/ocsinventory-client/ipdiscover"
+			if(system("/usr/sbin/ipdiscover > /dev/null")){
+				open IPDISCOVER, ">/usr/sbin/ipdiscover"
 					or die "Cannot go back to the previous version : $!\n";
 				print IPDISCOVER $old;
 				close IPDISCOVER;
@@ -1035,7 +1035,7 @@
 	  }
 	return unless($iface);
 	#and we launch the ipdiscover
-	$ipdiscover = `/etc/ocsinventory-client/ipdiscover $iface`;
+	$ipdiscover = `/usr/sbin/ipdiscover $iface`;
 		if($ipdiscover){
 		 	$request{'CONTENT'}{'IPDISCOVER'} = XML::Simple::XMLin( $ipdiscover, ForceArray => 'H');
 		}