mirror of
https://github.com/troglobit/finit.git
synced 2026-11-23 20:11:44 +00:00
tmpfiles: add the C+ entry, copy to a directory that is not empty
A C entry leaves a directory alone when there is something in it. In
tmpfiles.d(5) a C+ entry copies to it anyway: what the directory lacks
is added, and what it has is not overwritten.
C+ /etc/skel - - - - /usr/share/factory/etc/skel
tmpfiles reads C+ as C. Let the + through to copy_tree().
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
4 files changed
+13
-3
No files matched your search
+1
-1
@@ -1917,7 +1917,7 @@ static void tmpfiles(char *line)
|
||||
if (lstat(arg, &ast))
|
||||
break;
|
||||
|
||||
rc = copy_tree(arg, &ast, path, 0);
|
||||
rc = copy_tree(arg, &ast, path, plus);
|
||||
if (!rc && !lstat(path, &st) && !S_ISLNK(st.st_mode) && !((st.st_mode ^ ast.st_mode) & S_IFMT) &&
|
||||
perm_path(path, &perm, strc, O_PATH))
|
||||
warn("Failed setting mode/owner on %s", path);
|
||||
|
||||
Reference in new issue
Block a user