mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-02-10 02:55:15 +07:00
nspawn: bind mount /etc/localtime
This commit is contained in:
parent
fd14078a3a
commit
715ac17a84
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user