fi
AM_CONDITIONAL(ENABLE_UPSTART_MONITORING, [test "$enable_upstart_monitoring" = yes])
+AC_ARG_ENABLE(systemd-integration, AS_HELP_STRING([--enable-systemd-integration],[coordinate boot up with systemd]),enable_systemd_integration=$enableval,enable_systemd_integration=no)
+AM_CONDITIONAL(ENABLE_SYSTEMD_INTEGRATION, [test "$enable_systemd_integration" = yes])
+
+if text x$enable_systemd_integration = xyes; then
+ AC_DEFINE(PLY_ENABLE_SYSTEMD_INTEGRATION, 1, [Coordinate boot up with systemd])
+fi
+
AC_ARG_WITH(system-root-install, AS_HELP_STRING([--with-system-root-install],[Install client in /bin and daemon in /sbin]),with_system_root_install=${withval},with_system_root_install=yes)
AM_CONDITIONAL(WITH_SYSTEM_ROOT_INSTALL, [test "$with_system_root_install" = yes])
}
}
+#ifdef PLY_ENABLE_SYSTEMD_INTEGRATION
+static void
+tell_systemd_to_print_details (state_t *state)
+{
+ ply_trace ("telling systemd to start printing details");
+ if (kill (1, SIGRTMIN + 20) < 0)
+ ply_trace ("could not tell systemd to print details: %m");
+}
+
+static void
+tell_systemd_to_stop_printing_details (state_t *state)
+{
+ ply_trace ("telling systemd to stop printing details");
+ if (kill (1, SIGRTMIN + 21) < 0)
+ ply_trace ("could not tell systemd to stop printing details: %m");
+}
+#endif
+
static ply_boot_splash_t *
start_boot_splash (state_t *state,
const char *theme_path,
state->is_attached = true;
state->session = session;
+#ifdef PLY_ENABLE_SYSTEMD_INTEGRATION
+ tell_systemd_to_print_details (state);
+#endif
+
return true;
}
if (!state->is_attached)
return;
+#ifdef PLY_ENABLE_SYSTEMD_INTEGRATION
+ tell_systemd_to_stop_printing_details (state);
+#endif
+
ply_trace ("detaching from terminal session");
ply_terminal_session_detach (state->session);
state->is_redirected = false;