update-done: create /etc and /var if they didn't exist

Previously, we would fail. But this doesn't seem useful: we may want to
mark the update as done even if /etc/ or /var/ no updates were necessary
and there was no need to create /etc/ or /var/ yet.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2025-03-20 15:57:14 +01:00
parent 2ff40c758e
commit ace814f0a8
+1 -1
View File
@@ -32,7 +32,7 @@ static int save_timestamp(const char *dir, struct timespec *ts) {
fd = chase_and_open(dir, arg_root,
CHASE_PREFIX_ROOT | CHASE_WARN | CHASE_MUST_BE_DIRECTORY,
O_DIRECTORY | O_CLOEXEC,
O_DIRECTORY | O_CLOEXEC | O_CREAT,
&dirpath);
if (fd < 0)
return log_error_errno(fd, "Failed to open %s%s: %m", strempty(arg_root), dir);