LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File plymouth-remove-pid-file.patch of Package plymouth (Project openSUSE:Factory)

From 512e3a78469af8b0cee02007db6144d1bbc63e01 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Mon, 10 Sep 2012 16:43:09 -0400
Subject: [PATCH 1/4] main: fix debug message

If plymouthd is already running, then a second invocation will
fail with the message:

could not log bootup

This message is misleading, so fix it.
---
 src/main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: plymouth-0.8.6.1/src/main.c
===================================================================
--- plymouth-0.8.6.1.orig/src/main.c
+++ plymouth-0.8.6.1/src/main.c
@@ -2478,6 +2478,17 @@ main (int    argc,
    */
   argv[0][0] = '@';
 
+  state.boot_server = start_boot_server (&state);
+
+  if (state.boot_server == NULL)
+    {
+      ply_trace ("plymouthd is already running");
+
+      if (daemon_handle != NULL)
+        ply_detach_daemon (daemon_handle, EX_UNAVAILABLE);
+      return EX_UNAVAILABLE;
+    }
+
   state.boot_buffer = ply_buffer_new ();
 
   if (attach_to_session)
@@ -2492,19 +2503,6 @@ main (int    argc,
         }
     }
 
-  state.boot_server = start_boot_server (&state);
-
-  if (state.boot_server == NULL)
-    {
-      ply_trace ("could not log bootup: %m");
-
-      detach_from_running_session (&state);
-
-      if (daemon_handle != NULL)
-        ply_detach_daemon (daemon_handle, EX_UNAVAILABLE);
-      return EX_UNAVAILABLE;
-    }
-
   state.progress = ply_progress_new ();
 
   ply_progress_load_cache (state.progress,
Index: plymouth-0.8.6.1/systemd-units/plymouth-start.service.in
===================================================================
--- plymouth-0.8.6.1.orig/systemd-units/plymouth-start.service.in
+++ plymouth-0.8.6.1/systemd-units/plymouth-start.service.in
@@ -5,7 +5,6 @@ Wants=systemd-ask-password-plymouth.path
 After=systemd-vconsole-setup.service systemd-udev-trigger.service
 Before=systemd-ask-password-plymouth.service
 ConditionKernelCommandLine=!plymouth.enable=0
-ConditionPathExists=!@plymouthruntimedir@/pid
 
 [Service]
 ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=@plymouthruntimedir@/pid --attach-to-session