[Initng-svn] r1967 - initng/plugins/splash
svn at initng.thinktux.net
svn at initng.thinktux.net
Mon Nov 7 01:16:25 CET 2005
Author: SaTaN0r1
Date: Mon Nov 7 01:16:24 2005
New Revision: 1967
Modified:
initng/plugins/splash/initng_splash.c
Log:
updated the splash plugin to have the infrastructure to show the icons with gensplash
Modified: initng/plugins/splash/initng_splash.c
==============================================================================
--- initng/plugins/splash/initng_splash.c (original)
+++ initng/plugins/splash/initng_splash.c Mon Nov 7 01:16:24 2005
@@ -164,6 +164,48 @@
if (splash_type == GENSPLASH)
{
+ char svc_name[100];
+ const char* svc_status = NULL;
+ int i;
+
+ i = 0;
+ if (service->name)
+ {
+ if (strncmp(service->name, "net/", 4) == 0)
+ {
+ strncpy(svc_name, service->name, 100);
+ svc_name[3] = '.';
+ }
+ else
+ {
+ while (service->name[i] && service->name[i] != '/')
+ i++;
+ if (service->name[i])
+ i++;
+ strncpy (svc_name, service->name + i, 100);
+ }
+
+ if (service->a_status == LOADING ||
+ service->a_status == STARTING ||
+ service->a_status == WAITING_FOR_START_DEP)
+ svc_status = "svc_start";
+ if (service->a_status == FAIL_STARTING ||
+ service->a_status == START_DEP_FAILED)
+ svc_status = "svc_start_failed";
+ if (service->a_status == RUNNING ||
+ service->a_status == DONE)
+ svc_status = "svc_started";
+ if (service->a_status == STOP_DEP_FAILED ||
+ service->a_status == FAIL_STOPPING)
+ svc_status = "svc_stop_failed";
+ if (service->a_status == STOPPED)
+ svc_status = "svc_stopped";
+ if (service->a_status == STOPPING ||
+ service->a_status == WAITING_FOR_STOP_DEP)
+ svc_status = "svc_stop";
+ if (svc_status)
+ fprintf(fd, "update_svc %s %s\n", svc_name, svc_status);
+ }
/*
* repaint is an Expensive operation, but required
* for the text string that says 10%, etc...
More information about the Initng-svn
mailing list