tmpfiles: fix error message and ignore unremovable dirs (EBUSY)

Fix copy-paste of error message from cond-w.c

A read-only root filesystem may have /var/lock, while we want to remove
it and add a symlink to ../run/lock.  Ignore errors from this since we
cannot do anything about it.  It is up to the user to fix their skeleton
or use an overlay.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2024-01-07 13:56:31 +01:00
parent 2f281665af
commit d5d9cd5645
+2 -2
View File
@@ -78,8 +78,8 @@ static int do_delete(const char *fpath, const struct stat *sb, int tflag, struct
if (ftw->level == 0)
return 1;
if (remove(fpath))
warn("Failed removing condition %s", fpath);
if (remove(fpath) && errno != EBUSY)
warn("Failed removing %s", fpath);
return 0;