[lxc-devel] [PATCH] lxc-alpine: copy /etc/TZ to container if present

Kaarle Ritvanen kaarle.ritvanen at datakunkku.fi
Sat Jan 25 21:09:54 UTC 2014


Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen at datakunkku.fi>
---
 templates/lxc-alpine.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
index ac328a4..50a6a71 100644
--- a/templates/lxc-alpine.in
+++ b/templates/lxc-alpine.in
@@ -109,6 +109,11 @@ tty4:12345:respawn:/sbin/getty 38400 tty4
 ::ctrlaltdel:/sbin/reboot
 ::shutdown:/sbin/rc shutdown
 EOF
+    # set up timezone
+    if [ -f /etc/TZ ]; then
+        cp /etc/TZ "$rootfs/etc/TZ"
+    fi
+
     # set up nameserver
     grep nameserver /etc/resolv.conf > "$rootfs/etc/resolv.conf"
 
-- 
1.8.3.1



More information about the lxc-devel mailing list