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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user