[Initng-svn] r1909 - initng/src

svn at initng.thinktux.net svn at initng.thinktux.net
Tue Nov 1 12:43:29 CET 2005


Author: jimmy
Date: Tue Nov  1 12:43:28 2005
New Revision: 1909

Modified:
   initng/src/initng_active_db.c
   initng/src/initng_common.c
   initng/src/initng_handler.c
Log:
Stop services, even if an service that have to stop first, dont stop correctly.


Modified: initng/src/initng_active_db.c
==============================================================================
--- initng/src/initng_active_db.c	(original)
+++ initng/src/initng_active_db.c	Tue Nov  1 12:43:28 2005
@@ -382,11 +382,13 @@
             /* count almost all */
             switch (current->a_status)
             {
+		/* dont count stopped services. */
                 case FAIL_STARTING:
                 case FAIL_STOPPING:
                 case START_DEP_FAILED:
                 case STOP_DEP_FAILED:
                 case STOPPED:
+		case FREEING:
                     break;
                 default:
                     counter++;

Modified: initng/src/initng_common.c
==============================================================================
--- initng/src/initng_common.c	(original)
+++ initng/src/initng_common.c	Tue Nov  1 12:43:28 2005
@@ -235,6 +235,7 @@
     }
 }
 
+#ifdef DEP_FAILED_TO_STOP
 /*
  * when a service fails to stop, this function
  * walks thru all its dependencys, and mark it "dependency failed to stop"
@@ -254,6 +255,7 @@
             mark_service(current, STOP_DEP_FAILED);
     }
 }
+#endif
 
 static void check_sys_state_up(void)
 {
@@ -385,7 +387,10 @@
     /* this will make all services, that depend of this to stop, DEP_FAILED_TO_STOP */
     if (service->a_status == FAIL_STOPPING)
     {
-        dep_failed_to_stop(service);
+	/* we might wanna stop services, even if a stop depended service wont stop */
+#ifdef DEP_FAIL_TO_STOP
+	dep_failed_to_stop(service);
+#endif
         check_sys_state_up();
     }
 

Modified: initng/src/initng_handler.c
==============================================================================
--- initng/src/initng_handler.c	(original)
+++ initng/src/initng_handler.c	Tue Nov  1 12:43:28 2005
@@ -549,6 +549,8 @@
         switch (current->a_status)
         {
             case STOPPED:
+	    
+	    /* no need to wait on failing services, before stopping */
             case START_DEP_FAILED:
             case STOP_DEP_FAILED:
             case FAIL_STARTING:


More information about the Initng-svn mailing list