summaryrefslogtreecommitdiff
path: root/media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch')
-rw-r--r--media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch b/media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch
new file mode 100644
index 00000000..bc7b6ee0
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch
@@ -0,0 +1,74 @@
+commit a58099249acdce1fbdab19f5dfea0704c4c545f2
+Author: MichaƂ Januszewski <spock@gentoo.org>
+Date: Sun Dec 28 13:32:16 2008 +0100
+
+ gentoo: make the splash plugin work with OpenRC 0.4.*
+
+diff --git a/gentoo/splash.c b/gentoo/splash.c
+index 26d0fa4..b6fa774 100644
+--- a/gentoo/splash.c
++++ b/gentoo/splash.c
+@@ -593,7 +593,7 @@ static int splash_start(const char *runlevel)
+
+ /* Get a list of services that we'll have to handle. */
+ /* We're rebooting/shutting down. */
+- if (!strcmp(runlevel, RC_LEVEL_SHUTDOWN) || !strcmp(runlevel, RC_LEVEL_REBOOT)) {
++ if (!strcmp(runlevel, RC_LEVEL_SHUTDOWN)) {
+ if ((err = fbsplash_cache_prep()))
+ return err;
+ splash_svcs_stop(runlevel);
+@@ -690,10 +690,14 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+ int retval = 0;
+
+ runlev = rc_runlevel_get();
+- if (!strcmp(runlev, RC_LEVEL_REBOOT))
+- type = fbspl_reboot;
+- else if (!strcmp(runlev, RC_LEVEL_SHUTDOWN))
+- type = fbspl_shutdown;
++ if (!strcmp(runlev, RC_LEVEL_SHUTDOWN)) {
++ char *t = getenv("RUNLEVEL");
++ if (t && !strcmp(t, "6")) {
++ type = fbspl_reboot;
++ } else {
++ type = fbspl_shutdown;
++ }
++ }
+
+ /* Get boot and default levels from env variables exported by RC.
+ * If unavailable, use the default ones. */
+@@ -716,7 +720,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+ list = rc_stringlist_new();
+ get_list_fp(list, fp);
+ TAILQ_FOREACH(s, list, entries)
+- rc_service_mark(s->value, RC_SERVICE_COLDPLUGGED);
++ rc_service_mark(s->value, RC_SERVICE_HOTPLUGGED);
+ pclose(fp);
+ rc_stringlist_free(list);
+ }
+@@ -739,7 +743,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+ goto exit;
+
+ if (rc_runlevel_stopping() && strcmp(runlev, bootlevel) &&
+- strcmp(runlev, RC_LEVEL_REBOOT) && strcmp(runlev, RC_LEVEL_SHUTDOWN))
++ strcmp(runlev, RC_LEVEL_SHUTDOWN))
+ goto exit;
+ }
+
+@@ -763,7 +767,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+ case RC_HOOK_RUNLEVEL_STOP_IN:
+ /* Start the splash daemon on reboot. The theme hook is called
+ * from splash_start(). */
+- if (strcmp(name, RC_LEVEL_REBOOT) == 0 || strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
++ if (strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
+ if ((i = splash_start(name))) {
+ fbsplash_set_verbose(0);
+ retval= i;
+@@ -788,7 +792,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+ case RC_HOOK_RUNLEVEL_STOP_OUT:
+ /* Make sure the progress indicator reaches 100%, even if
+ * something went wrong along the way. */
+- if (strcmp(name, RC_LEVEL_REBOOT) == 0 || strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
++ if (strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
+ config->verbosity = FBSPL_VERB_QUIET;
+ i = fbsplash_check_daemon(&pid_daemon);
+ config->verbosity = FBSPL_VERB_NORMAL;