Sophie

Sophie

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

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

--- OCSNG_LINUX_AGENT_1.0-RC1/ocsinventory-installer.pl.old	2006-01-29 18:28:07.000000000 +0100
+++ OCSNG_LINUX_AGENT_1.0-RC1/ocsinventory-installer.pl	2006-01-29 18:31:59.000000000 +0100
@@ -134,7 +134,7 @@
 #Permissions checking
 (-w "/etc") && (-w "/etc/cron.daily")?1:die "You don't have enough permissions to run this program. Are you really root ?\n";
 #
-die "Don't find require directory\n" unless(-d "./require");
+#die "Don't find require directory\n" unless(-d "./require");
 #Verifying existing installation ($reinstall flag)
 &_deco;
 if(-e "/etc/ocsinventory-client"){
@@ -216,8 +216,8 @@
 ##########
 #directories creation
 #Installation directory
-if(-d "/etc/ocsinventory-client"){system("rm", "-rf", "/etc/ocsinventory-client")  and die "Cannot replace /etc/ocsinventory-client\n"}
-mkdir("/etc/ocsinventory-client") or die "Cannot create installation directory : $!\n";
+#if(-d "/etc/ocsinventory-client"){system("rm", "-rf", "/etc/ocsinventory-client")  and die "Cannot replace /etc/ocsinventory-client\n"}
+#mkdir("/etc/ocsinventory-client") or die "Cannot create installation directory : $!\n";
 
 #Log directory
 if(-d "/var/log/ocsinventory-client"){system("rm", "-rf", "/var/log/ocsinventory-client")  and die "Impossible de remplacer /var/log/ocsinventory-client: $!\n"}
@@ -242,8 +242,8 @@
 close ADM;
 
 #Installation of ipdiscover and dmidecode
-system ("cp","ocsinventory-client.pl","/etc/ocsinventory-client") and die "Cannot copy ocs linux agent : $!\n";
-system ("cp -r require/* /etc/ocsinventory-client") and die "Cannot copy ocs linux binaries : $!\n"; 
+#system ("cp","ocsinventory-client.pl","/etc/ocsinventory-client") and die "Cannot copy ocs linux agent : $!\n";
+#system ("cp -r require/* /etc/ocsinventory-client") and die "Cannot copy ocs linux binaries : $!\n"; 
 
 
 #Cron task programmed (if http's way)
@@ -258,8 +258,8 @@
 	if [ -e '/bin/ocsinv' ]; then
 		/bin/ocsinv
 		exit 0;
-	elif [ -e /etc/ocsinventory-client/ocsinventory-client.pl ]; then
-		perl /etc/ocsinventory-client/ocsinventory-client.pl
+	elif [ -e /usr/sbin/ocsinventory-client.pl ]; then
+		perl /usr/sbin/ocsinventory-client.pl
 		exit 0;
 	else
 		echo ---Error report of OCSInventory CRON task--- > $ERRLOG
@@ -283,7 +283,7 @@
 if(-l "/bin/ocsinv"){
 	unlink "/bin/ocsinv";
 }
-symlink  "/etc/ocsinventory-client/ocsinventory-client.pl", "/bin/ocsinv"
+symlink  "/usr/sbin/ocsinventory-client.pl", "/bin/ocsinv"
 	or warn "Cannot create symbolic link in /bin : $!\n";
 
 #####