summaryrefslogtreecommitdiffstats
path: root/main/lxc/0001-lxc-alpine-copy-etc-TZ-to-container-if-present.patch
blob: 5ea417db5c058cb2bc4bcc017b7fbcda059b2e01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From e4a08b5ec1798c6c2fcf129018f666148aeedf8b Mon Sep 17 00:00:00 2001
From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
Date: Sat, 25 Jan 2014 22:58:58 +0200
Subject: [PATCH] lxc-alpine: copy /etc/TZ to container if present

Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@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