1 |
spock 08/12/28 22:55:23 |
2 |
|
3 |
Added: splashutils-openrc-0.4-fix.patch |
4 |
Log: |
5 |
Fix bug #252134 (compatibility with OpenRC 0.4.x) and #251953 (pre-stripped files). Remove forced serial make (-j1) in 1.5.4.3. |
6 |
(Portage version: 2.1.6.4/cvs/Linux 2.6.28-rc8 x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: splashutils-openrc-0.4-fix.patch |
15 |
=================================================================== |
16 |
commit a58099249acdce1fbdab19f5dfea0704c4c545f2 |
17 |
Author: MichaĆ Januszewski <spock@g.o> |
18 |
Date: Sun Dec 28 13:32:16 2008 +0100 |
19 |
|
20 |
gentoo: make the splash plugin work with OpenRC 0.4.* |
21 |
|
22 |
diff --git a/gentoo/splash.c b/gentoo/splash.c |
23 |
index 26d0fa4..b6fa774 100644 |
24 |
--- a/gentoo/splash.c |
25 |
+++ b/gentoo/splash.c |
26 |
@@ -593,7 +593,7 @@ static int splash_start(const char *runlevel) |
27 |
|
28 |
/* Get a list of services that we'll have to handle. */ |
29 |
/* We're rebooting/shutting down. */ |
30 |
- if (!strcmp(runlevel, RC_LEVEL_SHUTDOWN) || !strcmp(runlevel, RC_LEVEL_REBOOT)) { |
31 |
+ if (!strcmp(runlevel, RC_LEVEL_SHUTDOWN)) { |
32 |
if ((err = fbsplash_cache_prep())) |
33 |
return err; |
34 |
splash_svcs_stop(runlevel); |
35 |
@@ -690,10 +690,14 @@ int rc_plugin_hook(RC_HOOK hook, const char *name) |
36 |
int retval = 0; |
37 |
|
38 |
runlev = rc_runlevel_get(); |
39 |
- if (!strcmp(runlev, RC_LEVEL_REBOOT)) |
40 |
- type = fbspl_reboot; |
41 |
- else if (!strcmp(runlev, RC_LEVEL_SHUTDOWN)) |
42 |
- type = fbspl_shutdown; |
43 |
+ if (!strcmp(runlev, RC_LEVEL_SHUTDOWN)) { |
44 |
+ char *t = getenv("RUNLEVEL"); |
45 |
+ if (t && !strcmp(t, "6")) { |
46 |
+ type = fbspl_reboot; |
47 |
+ } else { |
48 |
+ type = fbspl_shutdown; |
49 |
+ } |
50 |
+ } |
51 |
|
52 |
/* Get boot and default levels from env variables exported by RC. |
53 |
* If unavailable, use the default ones. */ |
54 |
@@ -716,7 +720,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name) |
55 |
list = rc_stringlist_new(); |
56 |
get_list_fp(list, fp); |
57 |
TAILQ_FOREACH(s, list, entries) |
58 |
- rc_service_mark(s->value, RC_SERVICE_COLDPLUGGED); |
59 |
+ rc_service_mark(s->value, RC_SERVICE_HOTPLUGGED); |
60 |
pclose(fp); |
61 |
rc_stringlist_free(list); |
62 |
} |
63 |
@@ -739,7 +743,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name) |
64 |
goto exit; |
65 |
|
66 |
if (rc_runlevel_stopping() && strcmp(runlev, bootlevel) && |
67 |
- strcmp(runlev, RC_LEVEL_REBOOT) && strcmp(runlev, RC_LEVEL_SHUTDOWN)) |
68 |
+ strcmp(runlev, RC_LEVEL_SHUTDOWN)) |
69 |
goto exit; |
70 |
} |
71 |
|
72 |
@@ -763,7 +767,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name) |
73 |
case RC_HOOK_RUNLEVEL_STOP_IN: |
74 |
/* Start the splash daemon on reboot. The theme hook is called |
75 |
* from splash_start(). */ |
76 |
- if (strcmp(name, RC_LEVEL_REBOOT) == 0 || strcmp(name, RC_LEVEL_SHUTDOWN) == 0) { |
77 |
+ if (strcmp(name, RC_LEVEL_SHUTDOWN) == 0) { |
78 |
if ((i = splash_start(name))) { |
79 |
fbsplash_set_verbose(0); |
80 |
retval= i; |
81 |
@@ -788,7 +792,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name) |
82 |
case RC_HOOK_RUNLEVEL_STOP_OUT: |
83 |
/* Make sure the progress indicator reaches 100%, even if |
84 |
* something went wrong along the way. */ |
85 |
- if (strcmp(name, RC_LEVEL_REBOOT) == 0 || strcmp(name, RC_LEVEL_SHUTDOWN) == 0) { |
86 |
+ if (strcmp(name, RC_LEVEL_SHUTDOWN) == 0) { |
87 |
config->verbosity = FBSPL_VERB_QUIET; |
88 |
i = fbsplash_check_daemon(&pid_daemon); |
89 |
config->verbosity = FBSPL_VERB_NORMAL; |