From: Zbigniew Jędrzejewski-Szmek Date: Wed, 19 Mar 2025 16:06:44 +0000 (+0100) Subject: update-done: create /etc and /var if they didn't exist X-Git-Tag: v258-rc1~1035^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ace814f0a8a512c4751af4429918dd2c638606cd;p=thirdparty%2Fsystemd.git 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. --- 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);