[Initng-svn] r3170 - initng/trunk/src
svn at initng.thinktux.net
svn at initng.thinktux.net
Thu Mar 2 04:05:30 CET 2006
Author: jimmy
Date: Thu Mar 2 04:05:29 2006
New Revision: 3170
Modified:
initng/trunk/src/initng_common.c
Log:
Now restart restarting services when they are down.
Modified: initng/trunk/src/initng_common.c
==============================================================================
--- initng/trunk/src/initng_common.c (original)
+++ initng/trunk/src/initng_common.c Thu Mar 2 04:05:29 2006
@@ -46,6 +46,7 @@
#include "initng_global.h"
#include "initng_static_states.h"
#include "initng_depend.h"
+#include "initng_handler.h"
/*
* this function walks through the g.Argv, if it founds service name,
@@ -438,7 +439,6 @@
return (FALSE);
}
}
- }
/* This checks if all services on a runlevel is up, then set STATE_UP */
if (IS_UP(service))
@@ -451,6 +451,15 @@
check_sys_state_up();
}
+ /* if this service is marked restarting, please restart it if its set to STOPPED */
+ if (IS_DOWN(service))
+ {
+ if(initng_active_db_is(&RESTARTING, service))
+ {
+ initng_active_db_remove(&RESTARTING, service);
+ initng_handler_start_service(service);
+ }
+ }
/* this will make all services, that depend of this to stop, DEP_FAILED_TO_STOP */
/*
if (IS_MARK(service, &FAIL_STOPPING))
@@ -462,7 +471,9 @@
}
*/
+ }
D_("service %s is now %s.\n", service->name,
service->current_state->state_name);
return (TRUE);
}
+
More information about the Initng-svn
mailing list