Emit "luc-group-started" even if failing to read the LUC
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Wed, 10 Oct 2012 13:03:31 +0000 (14:03 +0100)
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Tue, 16 Oct 2012 14:57:43 +0000 (15:57 +0100)
If we don't do this, the callback provided by the application will
not always be called and thus, sd_notify() will only be called if
reading the LUC is attempted. That breaks starting the NSC service
through systemd.

Signed-off-by: Jannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Reviewed-by: Jonathan Maw <jonathan.maw@codethink.co.uk>
NEWS
node-startup-controller/luc-starter.c

diff --git a/NEWS b/NEWS
index 4eeec71..2a82b84 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ x.y.z
 =====
 * Make systemd respond to "READY" notifications from the NSC (GT-2212)
 * Adjust D-Bus interface definitions to match the Node State Manager.
+* Fix starting through systemd if the LUC cannot be read from disk.
 
 1.0.0
 =====
index c52a22c..307aeb2 100644 (file)
@@ -609,6 +609,12 @@ luc_starter_start_groups_for_real (LUCStarter *starter)
                DLT_STRING ("Failed to read the last user context:"),
                DLT_STRING (error->message));
       g_error_free (error);
+
+      /* notify others that we are finished starting the groups, even if
+       * that failed */
+      g_signal_emit (starter, luc_starter_signals[SIGNAL_LUC_GROUPS_STARTED],
+                     0, NULL);
+
       return;
     }