diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-12-13 08:40:38 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-12-13 08:40:38 +0100 |
commit | 3e8d06d951d33c463e1efb67501e664f82cf3708 (patch) | |
tree | 20a135edcff42b53b5985c11f8528663654260ca /src/shared/install.c | |
parent | 2eded6cb2c5a7aebfafc77f9a23c1f6900da362c (diff) | |
download | systemd-3e8d06d951d33c463e1efb67501e664f82cf3708.tar.gz |
shared/install: add some more debugging info
Just to make it easier to understand what is going on.
Diffstat (limited to 'src/shared/install.c')
-rw-r--r-- | src/shared/install.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/shared/install.c b/src/shared/install.c index ebc56a4aa6..37d8830781 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -477,8 +477,10 @@ static int create_symlink( if (!dirname) return -ENOMEM; - if (chroot_symlinks_same(paths->root_dir, dirname, dest, old_path)) + if (chroot_symlinks_same(paths->root_dir, dirname, dest, old_path)) { + log_debug("Symlink %s → %s already exists", new_path, dest); return 1; + } if (!force) { unit_file_changes_add(changes, n_changes, -EEXIST, new_path, dest); @@ -2657,7 +2659,11 @@ int unit_file_lookup_state( r = install_info_discover(scope, &c, paths, name, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS, &i, NULL, NULL); if (r < 0) - return r; + return log_debug_errno(r, "Failed to discover unit %s: %m", name); + + assert(IN_SET(i->type, UNIT_FILE_TYPE_REGULAR, UNIT_FILE_TYPE_MASKED)); + log_debug("Found unit %s at %s (%s)", name, strna(i->path), + i->type == UNIT_FILE_TYPE_REGULAR ? "regular file" : "mask"); /* Shortcut things, if the caller just wants to know if this unit exists. */ if (!ret) |