aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-12-23 14:44:31 +0000
committerJohn Crispin <john@openwrt.org>2015-12-23 14:44:31 +0000
commit3f78186f765cf89c6795a0c1b4f404214fd3d6b0 (patch)
treedd9379e2bd8a272101726cd3507ea77d69ae5e84 /package/base-files/files
parent7029ee5abea4ad43d6380f8c19319e48dc66aacb (diff)
downloadupstream-3f78186f765cf89c6795a0c1b4f404214fd3d6b0.tar.gz
upstream-3f78186f765cf89c6795a0c1b4f404214fd3d6b0.tar.bz2
upstream-3f78186f765cf89c6795a0c1b4f404214fd3d6b0.zip
base-files: allow timezone to be overriden by zonename (proper zoneinfo support)
Signed-off-by: Roman Yeryomin <roman@advem.lv> SVN-Revision: 47980
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/etc/init.d/system3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/base-files/files/etc/init.d/system b/package/base-files/files/etc/init.d/system
index 6388d62ea2..531aa8cbc5 100755
--- a/package/base-files/files/etc/init.d/system
+++ b/package/base-files/files/etc/init.d/system
@@ -27,7 +27,8 @@ system_config() {
echo "$hostname" > /proc/sys/kernel/hostname
[ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
echo "$timezone" > /tmp/TZ
- [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && \
+ ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime && rm -f /tmp/TZ
# apply timezone to kernel
date -k