diff options
author | Felix Riemann <felix.riemann@sma.de> | 2020-10-19 18:54:53 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-20 13:46:36 +0900 |
commit | 1eee15c3885fcc9f6a40df7e42347cb8fca71280 (patch) | |
tree | f7502db8de3824d4d8ce91bba5f263ee90027c91 /src/update-done | |
parent | 4b28e50f9ef7655542a5ce5bc05857508ddf1495 (diff) | |
download | systemd-1eee15c3885fcc9f6a40df7e42347cb8fca71280.tar.gz |
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.
Diffstat (limited to 'src/update-done')
-rw-r--r-- | src/update-done/update-done.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/update-done/update-done.c b/src/update-done/update-done.c index e9d589e0e5..92c348d83b 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; } |