From: Felix Riemann Date: Mon, 19 Oct 2020 16:54:53 +0000 (+0200) Subject: update-done: Do not fail with read-only /etc or /var X-Git-Tag: v247-rc1~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1eee15c3885fcc9f6a40df7e42347cb8fca71280;p=thirdparty%2Fsystemd.git update-done: Do not fail with read-only /etc or /var With the switch from log_debug() to log_debug_errno() in commit c413bb28df systemd-update-done would fail without any error message if /etc or /var were read-only. This restores the previous behaviour to silently ignore these directories again. --- diff --git a/src/update-done/update-done.c b/src/update-done/update-done.c index e9d589e0e53..92c348d83bc 100644 --- a/src/update-done/update-done.c +++ b/src/update-done/update-done.c @@ -31,8 +31,8 @@ static int apply_timestamp(const char *path, struct timespec *ts) { r = write_string_file_atomic_label_ts(path, message, ts); if (r == -EROFS) - return log_debug_errno(r, "Cannot create \"%s\", file system is read-only.", path); - if (r < 0) + log_debug_errno(r, "Cannot create \"%s\", file system is read-only.", path); + else if (r < 0) return log_error_errno(r, "Failed to write \"%s\": %m", path); return 0; }