2013-01-23 14:44:07 +01:00
|
|
|
From 4b9d3dc9748ec3f52a71b06f851f4398462a1c60 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Michal Schmidt <mschmidt@redhat.com>
|
|
|
|
Date: Thu, 6 Dec 2012 16:20:10 +0100
|
|
|
|
Subject: [PATCH] systemctl: verbose message on missing [Install]
|
|
|
|
|
|
|
|
People still don't understand what the message implies.
|
|
|
|
We have to be more verbose (or more intelligent and detect some of the
|
|
|
|
cases automatically, but that's not so easy).
|
|
|
|
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=884438
|
|
|
|
---
|
|
|
|
src/systemctl/systemctl.c | 11 ++++++++++-
|
|
|
|
1 file changed, 10 insertions(+), 1 deletion(-)
|
|
|
|
|
2013-03-20 11:29:34 +01:00
|
|
|
Index: systemd-195/src/systemctl/systemctl.c
|
|
|
|
===================================================================
|
|
|
|
--- systemd-195.orig/src/systemctl/systemctl.c
|
|
|
|
+++ systemd-195/src/systemctl/systemctl.c
|
|
|
|
@@ -3783,7 +3783,16 @@ static int enable_unit(DBusConnection *b
|
2013-01-23 14:44:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (carries_install_info == 0)
|
|
|
|
- log_warning("The unit files have no [Install] section. They are not meant to be enabled using systemctl.");
|
|
|
|
+ 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"
|
|
|
|
+"1) A unit may be statically enabled by being symlinked from another unit's\n"
|
|
|
|
+" .wants/ or .requires/ directory.\n"
|
|
|
|
+"2) A unit's purpose may be to act as a helper for some other unit which has\n"
|
|
|
|
+" a requirement dependency on it.\n"
|
|
|
|
+"3) A unit may be started when needed via activation (socket, path, timer,\n"
|
|
|
|
+" D-Bus, udev, scripted systemctl call, ...).\n");
|
|
|
|
|
|
|
|
finish:
|
|
|
|
if (m)
|