From ace814f0a8a512c4751af4429918dd2c638606cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 19 Mar 2025 17:06:44 +0100 Subject: [PATCH] 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. --- src/update-done/update-done.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/update-done/update-done.c b/src/update-done/update-done.c index b30bb2dbf0b..62c12c5d214 100644 --- a/src/update-done/update-done.c +++ b/src/update-done/update-done.c @@ -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); -- 2.47.3