dbus_error_free(&error);
dbus_message_unref(m);
+ m = NULL;
continue;
}
return 1;
}
+ free(dest);
return 0;
}
}
if (!f) {
-#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)) || defined(TARGET_MEEGO) && defined (HAVE_SYSV_COMPAT)
+#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE) || defined(TARGET_MEEGO) || defined(TARGET_ALTLINUX)) && defined (HAVE_SYSV_COMPAT)
if (endswith(i->name, ".service")) {
char *sysv;
return -ENOENT;
}
+ i->path = filename;
+
+ if ((r = config_parse(filename, f, NULL, items, true, i)) < 0) {
+ fclose(f);
+ return r;
+ }
+
/* 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) {
+ !path_startswith(filename, "/etc")) {
fclose(f);
- return r;
+ return 1;
}
n_symlinks += strv_length(i->aliases);
if (!on_tty() || arg_no_pager)
return;
- if ((pager = getenv("PAGER")))
+ if ((pager = getenv("SYSTEMD_PAGER")) || (pager = getenv("PAGER")))
if (!*pager || streq(pager, "cat"))
return;