systemd/0036-systemctl-suppress-no-...

27 lines
1.1 KiB
Diff

From 599fc965a46c36b9be06bcfd026e2dadeefbbbf5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 19 May 2016 15:08:41 -0400
Subject: [PATCH] systemctl: suppress no-[Install] hint when --quiet is used
(#3295)
https://bugzilla.redhat.com/show_bug.cgi?id=1336960
(cherry picked from commit 35b132e8ad3c50614605e00cf8ff20988094d21c)
Resolves: rhbug#1336960
---
src/systemctl/systemctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 908ccabf8a..b4581fe542 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -5521,7 +5521,7 @@ static int enable_unit(int argc, char *argv[], void *userdata) {
r = 0;
}
- if (carries_install_info == 0)
+ if (carries_install_info == 0 && !arg_quiet)
log_warning("The unit files have no [Install] section. They are not meant to be enabled\n"
"using systemctl.\n"
"Possible reasons for having this kind of units are:\n"