X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsystemctl.c;h=99ada38309b7e3ab02a94f99b52e270cc79b7ae4;hb=ec2002f84928c0b5921a961cb2b8637563f29daa;hp=0a72874145f0c620ac66a904a9fb4cced8e55c4c;hpb=b21a0ef8fc3d78ca3cc9d08e8ec8e41705d9902e;p=elogind.git diff --git a/src/systemctl.c b/src/systemctl.c index 0a7287414..99ada3830 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -3323,6 +3323,13 @@ static int daemon_reload(DBusConnection *bus, char **args, unsigned n) { goto finish; } + if (streq(method, "Reexecute") && dbus_error_has_name(&error, DBUS_ERROR_NO_REPLY)) { + /* On reexecution, we expect a disconnect, not + * a reply */ + r = 0; + goto finish; + } + log_error("Failed to issue method call: %s", bus_error_message(&error)); r = -EIO; goto finish; @@ -4081,7 +4088,7 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo } if (!f) { -#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)) && defined (HAVE_SYSV_COMPAT) +#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)) || defined(TARGET_MEEGO) && defined (HAVE_SYSV_COMPAT) if (endswith(i->name, ".service")) { char *sysv; @@ -4152,6 +4159,14 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo return -ENOENT; } + /* Consider unit files stored in /lib and /usr always enabled + * if they have no [Install] data. */ + if (streq(verb, "is-enabled") && + strv_isempty(i->aliases) && + strv_isempty(i->wanted_by) && + !path_startswith(filename, "/etc")) + return 1; + i->path = filename; if ((r = config_parse(filename, f, NULL, items, true, i)) < 0) {