diff options
-rw-r--r-- | src/login/user-runtime-dir.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/login/user-runtime-dir.c b/src/login/user-runtime-dir.c index 930b1a99a..9dde42c30 100644 --- a/src/login/user-runtime-dir.c +++ b/src/login/user-runtime-dir.c @@ -99,20 +99,19 @@ static int user_remove_runtime_path(const char *runtime_path) { r = rm_rf(runtime_path, 0); if (r < 0) - log_error_errno(r, "Failed to remove runtime directory %s (before unmounting): %m", runtime_path); + log_debug_errno(r, "Failed to remove runtime directory %s (before unmounting), ignoring: %m", runtime_path); - /* Ignore cases where the directory isn't mounted, as that's - * quite possible, if we lacked the permissions to mount - * something */ + /* Ignore cases where the directory isn't mounted, as that's quite possible, if we lacked the permissions to + * mount something */ r = umount2(runtime_path, MNT_DETACH); if (r < 0 && !IN_SET(errno, EINVAL, ENOENT)) - log_error_errno(errno, "Failed to unmount user runtime directory %s: %m", runtime_path); + log_debug_errno(errno, "Failed to unmount user runtime directory %s, ignoring: %m", runtime_path); r = rm_rf(runtime_path, REMOVE_ROOT); - if (r < 0) - log_error_errno(r, "Failed to remove runtime directory %s (after unmounting): %m", runtime_path); + if (r < 0 && r != -ENOENT) + return log_error_errno(r, "Failed to remove runtime directory %s (after unmounting): %m", runtime_path); - return r; + return 0; } #if 0 /// having a User instance, elogind can ask its manager directly. |