diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-02-09 10:05:15 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2012-02-09 10:05:15 +0100 |
commit | ab5919fa1af147c2632fdae7bed4504c898a60af (patch) | |
tree | d6011dac890ca9a037b60a992f0671cf6eaa7cab | |
parent | 353e12c2f4a9e96a47eb80b80d2ffb7bc1d44a1b (diff) |
systemctl: check for no more work after chkconfig
Avoid a bogus message from 'systemctl enable ...' when all units given
are SysV services:
Warning: unit files do not carry install information. No operation
executed.
https://bugzilla.redhat.com/show_bug.cgi?id=787407
-rw-r--r-- | src/systemctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/systemctl.c b/src/systemctl.c index 12264f8ba7..ab6d126a26 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -3662,12 +3662,15 @@ static int enable_unit(DBusConnection *bus, char **args) { int r; DBusError error; - dbus_error_init(&error); - r = enable_sysv_units(args); if (r < 0) return r; + if (!args[1]) + return 0; + + dbus_error_init(&error); + if (!bus || avoid_bus()) { if (streq(verb, "enable")) { r = unit_file_enable(arg_scope, arg_runtime, arg_root, args+1, arg_force, &changes, &n_changes); |