Commit 0349a77a authored by Benjamin Berg's avatar Benjamin Berg Committed by Ray Strode
Browse files

main: Lower fallback warning when running in GDM

It is currently expected for the fallback to happen. So hide the errors,
but still log a single message to inform users about it.
parent 1abd5927
......@@ -543,7 +543,7 @@ main (int argc, char **argv)
#ifdef HAVE_SYSTEMD
gsm_util_export_user_environment (&error);
if (error) {
if (error && !g_getenv ("RUNNING_UNDER_GDM")) {
g_warning ("Failed to upload environment to systemd: %s", error->message);
g_clear_error (&error);
}
......@@ -567,7 +567,7 @@ main (int argc, char **argv)
* in a previous session
*/
gsm_util_systemd_reset_failed (&error);
if (error) {
if (error && !g_getenv ("RUNNING_UNDER_GDM")) {
g_warning ("Failed to reset failed state of units: %s", error->message);
g_clear_error (&error);
}
......@@ -581,8 +581,11 @@ main (int argc, char **argv)
}
/* We could not start the unit, fall back. */
g_warning ("Falling back to non-systemd startup procedure due to error: %s", error->message);
g_clear_error (&error);
if (g_getenv ("RUNNING_UNDER_GDM"))
g_message ("Falling back to non-systemd startup procedure. This is expected to happen for GDM sessions.");
else
g_warning ("Falling back to non-systemd startup procedure due to error: %s", error->message);
g_clear_error (&error);
}
#endif /* ENABLE_SYSTEMD_SESSION */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment