ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
8be66a
From 65e96327360ab41d44d5383dcecc82a19fad198c Mon Sep 17 00:00:00 2001
8be66a
From: Michal Sekletar <msekleta@redhat.com>
8be66a
Date: Fri, 22 Feb 2019 15:50:55 +0100
8be66a
Subject: [PATCH] logind: don't print warning when user@.service template is
8be66a
 masked
8be66a
8be66a
User instance of systemd is optional feature and if user@.service
8be66a
template is masked then administrator most likely doesn't want --user
8be66a
instances of systemd for logged in users. We don't need to be verbose
8be66a
about it.
8be66a
8be66a
(cherry picked from commit 03b6fa0c5b51b0d39334ff6ba183a3391443bcf6)
8be66a
8be66a
Resolves: #1880270
8be66a
---
8be66a
 src/login/logind-user.c | 3 ++-
8be66a
 1 file changed, 2 insertions(+), 1 deletion(-)
8be66a
8be66a
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
8be66a
index 8c4cd54a29..56b8066f12 100644
8be66a
--- a/src/login/logind-user.c
8be66a
+++ b/src/login/logind-user.c
8be66a
@@ -326,7 +326,8 @@ static int user_start_service(User *u) {
8be66a
                         &job;;
8be66a
         if (r < 0)
8be66a
                 /* we don't fail due to this, let's try to continue */
8be66a
-                log_error_errno(r, "Failed to start user service, ignoring: %s", bus_error_message(&error, r));
8be66a
+                log_full_errno(sd_bus_error_has_name(&error, BUS_ERROR_UNIT_MASKED) ? LOG_DEBUG : LOG_WARNING, r,
8be66a
+                               "Failed to start user service '%s', ignoring: %s", u->service, bus_error_message(&error, r));
8be66a
         else
8be66a
                 u->service_job = job;
8be66a