summaryrefslogtreecommitdiff
path: root/src/nspawn
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-12-21 00:39:50 +0100
committerLennart Poettering <lennart@poettering.net>2016-12-21 19:09:32 +0100
commit8ccf7e9e96ac89f02424c065e39043b5165f8bca (patch)
treead6a86a00dd18dc11188ff289f3ebb85ccbfd5aa /src/nspawn
parente4b45b32e59d7481fbbb0756d012bba6556223a8 (diff)
nspawn: don't complain when we can't fix the timezone of read-only containers
There's nothing we can do about it, hence don't complain.
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 224d30fca6..5df00df6ed 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1288,15 +1288,18 @@ static int setup_timezone(const char *dest) {
return 0;
}
- r = unlink(where);
- if (r < 0 && errno != ENOENT) {
- log_error_errno(errno, "Failed to remove existing timezone info %s in container: %m", where);
+ if (unlink(where) < 0 && errno != ENOENT) {
+ log_full_errno(IN_SET(errno, EROFS, EACCES, EPERM) ? LOG_DEBUG : LOG_WARNING, /* Don't complain on read-only images */
+ errno,
+ "Failed to remove existing timezone info %s in container, ignoring: %m", where);
return 0;
}
what = strjoina("../usr/share/zoneinfo/", z);
if (symlink(what, where) < 0) {
- log_error_errno(errno, "Failed to correct timezone of container: %m");
+ log_full_errno(IN_SET(errno, EROFS, EACCES, EPERM) ? LOG_DEBUG : LOG_WARNING,
+ errno,
+ "Failed to correct timezone of container, ignoring: %m");
return 0;
}