daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
9fc0f6
From b0010d76a8c56900d15fab8ac1ed94d364d1e566 Mon Sep 17 00:00:00 2001
9fc0f6
From: Lukas Nykryn <lnykryn@redhat.com>
9fc0f6
Date: Wed, 23 Jul 2014 14:08:18 +0200
9fc0f6
Subject: [PATCH] cgroups-agent: down-grade log level
9fc0f6
9fc0f6
(cherry picked from commit 844de4355592259eebcffddfc38c63266e451cb6)
9fc0f6
9fc0f6
Conflicts:
9fc0f6
        src/cgroups-agent/cgroups-agent.c
9fc0f6
9fc0f6
Resolves: #1044386
9fc0f6
---
9fc0f6
 src/cgroups-agent/cgroups-agent.c | 8 ++++++--
9fc0f6
 1 file changed, 6 insertions(+), 2 deletions(-)
9fc0f6
9fc0f6
diff --git a/src/cgroups-agent/cgroups-agent.c b/src/cgroups-agent/cgroups-agent.c
9fc0f6
index a47949a..43b9b3a 100644
9fc0f6
--- a/src/cgroups-agent/cgroups-agent.c
9fc0f6
+++ b/src/cgroups-agent/cgroups-agent.c
9fc0f6
@@ -50,7 +50,11 @@ int main(int argc, char *argv[]) {
9fc0f6
 
9fc0f6
         bus = dbus_connection_open_private("unix:path=/run/systemd/private", &error);
9fc0f6
         if (!bus) {
9fc0f6
-                log_warning("Failed to get D-Bus connection: %s", bus_error_message(&error));
9fc0f6
+                log_warning("Failed to get D-Bus connection: %s", strerror(-r));
9fc0f6
+                /* If we couldn't connect we assume this was triggered
9fc0f6
+                 * while systemd got restarted/transitioned from
9fc0f6
+                 * initrd to the system, so let's ignore this */
9fc0f6
+                log_debug("Failed to get D-Bus connection: %s", strerror(-r));
9fc0f6
                 goto finish;
9fc0f6
         }
9fc0f6
 
9fc0f6
@@ -73,7 +77,7 @@ int main(int argc, char *argv[]) {
9fc0f6
         }
9fc0f6
 
9fc0f6
         if (!dbus_connection_send(bus, m, NULL)) {
9fc0f6
-                log_error("Failed to send signal message on private connection.");
9fc0f6
+                log_debug("Failed to send signal message on private connection.");
9fc0f6
                 goto finish;
9fc0f6
         }
9fc0f6