aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-05-03 17:12:09 +0200
committerLudovic Courtès <ludo@gnu.org>2019-05-03 17:47:29 +0200
commit78d6d5e8d9b10affb4a97dfe869ae4646b3c3c98 (patch)
tree638382b89434c2a4d7217431eb30092824437233
parentc8bb86f51c69f000d7b9ffa7fe8ee7d6544e38e6 (diff)
downloadgnu-guix-78d6d5e8d9b10affb4a97dfe869ae4646b3c3c98.tar
gnu-guix-78d6d5e8d9b10affb4a97dfe869ae4646b3c3c98.tar.gz
shepherd: Include /etc/localtime in service containers.
Fixes a bug whereby Tor (for example) would emit syslog messages with a UTC timestamp instead of local time. * gnu/build/shepherd.scm (default-mounts): Add /etc/localtime to MAPPINGS.
-rw-r--r--gnu/build/shepherd.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index f383259924..cf68f2108b 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -81,6 +81,14 @@
(not (memq 'user namespaces)))
accounts
'())
+
+ ;; Tell the process what timezone we're in. This
+ ;; makes sure that, for instance, its syslog
+ ;; messages have the correct timestamp.
+ ,(file-system-mapping
+ (source "/etc/localtime")
+ (target source))
+
,%store-mapping))) ;XXX: coarse-grain
(map file-system-mapping->bind-mount
(filter (lambda (mapping)