richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
Blob Blame History Raw
From b0010d76a8c56900d15fab8ac1ed94d364d1e566 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Wed, 23 Jul 2014 14:08:18 +0200
Subject: [PATCH] cgroups-agent: down-grade log level

(cherry picked from commit 844de4355592259eebcffddfc38c63266e451cb6)

Conflicts:
        src/cgroups-agent/cgroups-agent.c

Resolves: #1044386
---
 src/cgroups-agent/cgroups-agent.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/cgroups-agent/cgroups-agent.c b/src/cgroups-agent/cgroups-agent.c
index a47949a..43b9b3a 100644
--- a/src/cgroups-agent/cgroups-agent.c
+++ b/src/cgroups-agent/cgroups-agent.c
@@ -50,7 +50,11 @@ int main(int argc, char *argv[]) {
 
         bus = dbus_connection_open_private("unix:path=/run/systemd/private", &error);
         if (!bus) {
-                log_warning("Failed to get D-Bus connection: %s", bus_error_message(&error));
+                log_warning("Failed to get D-Bus connection: %s", strerror(-r));
+                /* If we couldn't connect we assume this was triggered
+                 * while systemd got restarted/transitioned from
+                 * initrd to the system, so let's ignore this */
+                log_debug("Failed to get D-Bus connection: %s", strerror(-r));
                 goto finish;
         }
 
@@ -73,7 +77,7 @@ int main(int argc, char *argv[]) {
         }
 
         if (!dbus_connection_send(bus, m, NULL)) {
-                log_error("Failed to send signal message on private connection.");
+                log_debug("Failed to send signal message on private connection.");
                 goto finish;
         }