On Sun, 01.07.12 19:37, Dave Reisner ([email protected]) wrote:
> A broken .include link in a unit file will cause 'systemctl
> list-unit-files' to simply return 'No such file or directory'. Ignore
> this silly error, since we know that the file really does exist.
Hmm, I figure we should at least log a message to syslog if this
happens, even if we don't return the error?
> ---
> src/shared/install.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/shared/install.c b/src/shared/install.c
> index 13ae9a9..4bb91e2 100644
> --- a/src/shared/install.c
> +++ b/src/shared/install.c
> @@ -1949,7 +1949,7 @@ int unit_file_get_list(
> goto found;
>
> r = unit_file_can_install(&paths, root_dir, f->path,
> true);
> - if (r < 0) {
> + if (r < 0 && r != -ENOENT) {
> free(f->path);
> free(f);
> goto finish;
Lennart
--
Lennart Poettering - Red Hat, Inc.
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel