[Initng-svn] r1904 - in initng: plugins plugins/splash src
svn at initng.thinktux.net
svn at initng.thinktux.net
Tue Nov 1 06:53:12 CET 2005
Author: thelich
Date: Tue Nov 1 06:53:11 2005
New Revision: 1904
Modified:
initng/plugins/Makefile.am
initng/plugins/splash/initng_splash.c
initng/plugins/splash/initng_splash.h
initng/src/initng_global.c
Log:
FIXES:
* splash plugin now should support bootsplash
* removed duplicate "plugin/critical" from makefile
* added missed assert.h include
Modified: initng/plugins/Makefile.am
==============================================================================
--- initng/plugins/Makefile.am (original)
+++ initng/plugins/Makefile.am Tue Nov 1 06:53:11 2005
@@ -16,7 +16,6 @@
depend \
initctl \
fstat \
- critical \
interactive \
iparser \
ngc2 \
Modified: initng/plugins/splash/initng_splash.c
==============================================================================
--- initng/plugins/splash/initng_splash.c (original)
+++ initng/plugins/splash/initng_splash.c Tue Nov 1 06:53:11 2005
@@ -58,6 +58,7 @@
SPLASH_NONE,
GENSPLASH,
SPLASHY,
+ BOOTSPLASH,
};
@@ -69,7 +70,8 @@
static const char *control_file[] = {
NULL,
GENSPLASH_FIFO,
- SPLASHY_FIFO
+ SPLASHY_FIFO,
+ BOOTSPLASH_FIFO
};
/* static const char* splash_message[] = {
@@ -185,10 +187,13 @@
else
{
/*
- * splash_type == SPLASHY
+ * splash_type == SPLASHY || splash_type == BOOTSPLASH
*/
- fprintf(fd, "progress %d\n", percent);
+ if (splash_type == SPLASHY)
+ fprintf(fd, "progress %d\n", percent);
+ else
+ fprintf(fd, "show %d\n", (65535 * percent) / 100);
/*
* see if X11 is starting
*/
@@ -199,17 +204,23 @@
{
if (service->a_status == LOADING ||
service->a_status == STARTING ||
- service->a_status == START_LAUNCHING ||
- service->a_status == START_LAUNCHED ||
service->a_status == RUNNING ||
service->a_status == DONE || percent == 100)
{
/* X11 is being started or runs, or we have reached 100% */
- fprintf(fd, "progress 99\n");
- fprintf(fd, "allowchvt\n"); //do we need this?
- fprintf(fd, "exit\n"); //terminate splasy
- //Now we should switch to the terminal X start on -but how canwe find out
- //which terminal it is?
+ if (splash_type == SPLASHY)
+ {
+ fprintf(fd, "progress 99\n");
+ fprintf(fd, "allowchvt\n"); //do we need this?
+ fprintf(fd, "exit\n"); //terminate splasy
+ //Now we should switch to the terminal X start on -but how canwe find out
+ //which terminal it is?
+ }
+ else
+ {
+ fprintf(fd, "show 65535\n");
+ fprintf(fd, "master\n");
+ }
}
}
@@ -259,6 +270,10 @@
{
splash_type = SPLASHY;
}
+ else if (strstr(arg, "bootsplash"))
+ {
+ splash_type = BOOTSPLASH;
+ }
if (strstr(arg, "shutdown"))
{
Modified: initng/plugins/splash/initng_splash.h
==============================================================================
--- initng/plugins/splash/initng_splash.h (original)
+++ initng/plugins/splash/initng_splash.h Tue Nov 1 06:53:11 2005
@@ -23,7 +23,7 @@
#define GENSPLASH_FIFO "/lib/splash/cache/.splash"
#define SPLASHY_FIFO "/etc/splashy/splashy.fifo"
-
+#define BOOTSPLASH_FIFO "/proc/splash"
int print_progress(active_h * service);
Modified: initng/src/initng_global.c
==============================================================================
--- initng/src/initng_global.c (original)
+++ initng/src/initng_global.c Tue Nov 1 06:53:11 2005
@@ -18,6 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
+#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
More information about the Initng-svn
mailing list