[Fedora-directory-commits] adminserver/admserv/cgi-ds ds_remove.c, 1.1, 1.2 ds_snmpctrl.c, 1.1, 1.2

Nathan Kinder (nkinder) fedora-directory-commits at redhat.com
Tue Jun 26 18:34:49 UTC 2007


Author: nkinder

Update of /cvs/dirsec/adminserver/admserv/cgi-ds
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16109/admserv/cgi-ds

Modified Files:
	ds_remove.c ds_snmpctrl.c 
Log Message:
Resolves: 245665
Summary: Removed server root logic from dsalib.



Index: ds_remove.c
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-ds/ds_remove.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ds_remove.c	13 Jun 2007 01:37:16 -0000	1.1
+++ ds_remove.c	26 Jun 2007 18:34:46 -0000	1.2
@@ -138,7 +138,7 @@
 {
     int 	status = -1;
     char	*servername;
-    char	*installroot;
+    char	*instdir;
     int		isRunning;
 #ifndef __LP64__  
 #if defined(__hpux) && !defined(__ia64)
@@ -216,23 +216,23 @@
 	if (servername) {
 		char line[1024];
 		int busy_retries = 3; /* if busy, retry this many times */
-		installroot = ds_get_install_root();
+		instdir = ds_get_instance_dir();
 		/* We may get busy errors if files are in use when we try
 		   to remove them, so if that happens, sleep for 30 seconds
 		   and try again */
-		status = ds_rm_rf(installroot, rm_rf_err_func, NULL);
+		status = ds_rm_rf(instdir, rm_rf_err_func, NULL);
 		while (status && try_rm_rf_again && busy_retries) {
 			PR_snprintf(line, sizeof(line), "Some files or directories in %s are still in use.  Will sleep for 30 seconds and try again.",
-						installroot);
+						instdir);
 			ds_show_message(line);
 			PR_Sleep(PR_SecondsToInterval(30));
 			try_rm_rf_again = 0;
 			--busy_retries;
-			status = ds_rm_rf(installroot, rm_rf_err_func, NULL);
+			status = ds_rm_rf(instdir, rm_rf_err_func, NULL);
 		}
 		if (status) {
 			PR_snprintf(line, sizeof(line), "Could not remove %s.  Please check log messages and try again.",
-						installroot);
+						instdir);
 			ds_send_error(line, 0);
 		}
 	}


Index: ds_snmpctrl.c
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-ds/ds_snmpctrl.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ds_snmpctrl.c	13 Jun 2007 01:37:16 -0000	1.1
+++ ds_snmpctrl.c	26 Jun 2007 18:34:46 -0000	1.2
@@ -130,7 +130,7 @@
 
    *pid = -1;
 
-   SLAPD_ROOT = ds_get_install_root();
+   SLAPD_ROOT = ds_get_instance_dir();
    PR_snprintf(path, sizeof(path), "%s/logs/%s", SLAPD_ROOT, NSLDAPAGT_PID);
    if (!ds_file_exists(path)) {
       return(-1);
@@ -279,7 +279,7 @@
       return(-1);
    } else {
 	   char *NETSITE_ROOT = getenv("NETSITE_ROOT");
-	   char *SLAPD_ROOT = ds_get_install_root();
+	   char *SLAPD_ROOT = ds_get_instance_dir();
 	   char command[1024];
 
 	   PR_snprintf(command, sizeof(command), "cd %s/%s; ./%s -d %s", NETSITE_ROOT, SUBAGT_PATH,




More information about the Fedora-directory-commits mailing list