[Initng-svn] r3167 - initng/trunk/plugins/service
svn at initng.thinktux.net
svn at initng.thinktux.net
Thu Mar 2 03:33:36 CET 2006
Author: jimmy
Date: Thu Mar 2 03:33:35 2006
New Revision: 3167
Modified:
initng/trunk/plugins/service/initng_service.c
Log:
Untested, becouse my buildsystem is broaken.
NEVER_KILL is added to service, good to put on services like fsck, that shud not be stopped by ANY timeout.
Modified: initng/trunk/plugins/service/initng_service.c
==============================================================================
--- initng/trunk/plugins/service/initng_service.c (original)
+++ initng/trunk/plugins/service/initng_service.c Thu Mar 2 03:33:35 2006
@@ -108,7 +108,7 @@
s_entry STOP_TIMEOUT = { "stop_timeout", INT, &TYPE_SERVICE,
"Let the stop process run maximum this time."
};
-
+s_entry NEVER_KILL = { "never_kill", SET, &TYPE_SERVICE, "This service is to important to be killed by any timeout!" };
/*
* ############################################################################
@@ -295,6 +295,7 @@
initng_service_data_types_add(&START_TIMEOUT);
initng_service_data_types_add(&STOP_TIMEOUT);
+ initng_service_data_types_add(&NEVER_KILL);
return (TRUE);
}
@@ -326,6 +327,7 @@
initng_service_data_types_del(&START_TIMEOUT);
initng_service_data_types_del(&STOP_TIMEOUT);
+ initng_service_data_types_del(&NEVER_KILL);
}
@@ -456,6 +458,10 @@
D_("Service %s, run init_SERVICE_START_RUN\n", service->name);
+ /* if NEVER_KILL is set, dont bother */
+ if(active_db_is(&NEVER_KILL, service))
+ return;
+
/* get the timeout */
timeout = initng_active_db_get_int(&START_TIMEOUT, service);
@@ -478,6 +484,10 @@
D_("Service %s, run init_SERVICE_STOP_RUN\n", service->name);
+ /* if NEVER_KILL is set, dont bother */
+ if(active_db_is(&NEVER_KILL, service))
+ return;
+
/* get the timeout */
timeout = initng_active_db_get_int(&STOP_TIMEOUT, service);
More information about the Initng-svn
mailing list