chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd14078
)
nspawn: bind mount /etc/localtime
author
Lennart Poettering
<lennart@poettering.net>
Wed, 16 Mar 2011 02:27:02 +0000
(
03:27
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 16 Mar 2011 02:27:02 +0000
(
03:27
+0100)
src/nspawn.c
patch
|
blob
|
history
diff --git
a/src/nspawn.c
b/src/nspawn.c
index cd528deb79314e487c0d042a96000be02d952e6d..aaa5d1f9d0c0d43aafeb0fa47887ec6b2d0732e9 100644
(file)
--- a/
src/nspawn.c
+++ b/
src/nspawn.c
@@
-125,9
+125,9
@@
static int mount_all(const char *dest) {
unsigned k;
int r = 0;
+ char *where;
for (k = 0; k < ELEMENTSOF(mount_table); k++) {
- char *where;
int t;
if (asprintf(&where, "%s/%s", dest, mount_table[k].where) < 0) {
@@
-167,6
+167,13
@@
static int mount_all(const char *dest) {
free(where);
}
+ /* Fix the timezone, if possible */
+ if (asprintf(&where, "%s/%s", dest, "/etc/localtime") >= 0) {
+ mount("/etc/localtime", where, "bind", MS_BIND, NULL);
+ mount("/etc/localtime", where, "bind", MS_BIND|MS_REMOUNT|MS_RDONLY, NULL);
+ free(where);
+ }
+
return r;
}