aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-09-26 02:28:04 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-09-26 02:28:04 +0000
commitcb8a262145c152831e1080ad0e1ed6dedb2f33a9 (patch)
tree9101c817c09d1bc4bf747ae8953806e3c73f1a22 /package/base-files/files/etc
parent32b5ea459c24eb0448dce2d8f8a7daffd39c7a2b (diff)
downloadupstream-cb8a262145c152831e1080ad0e1ed6dedb2f33a9.tar.gz
upstream-cb8a262145c152831e1080ad0e1ed6dedb2f33a9.tar.bz2
upstream-cb8a262145c152831e1080ad0e1ed6dedb2f33a9.zip
[package] base-files: use "zonename" system option to symlink /etc/localtime via /tmp/localtime to /usr/share/zoneinfo for glibc and eglibc
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28306 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/etc')
-rwxr-xr-xpackage/base-files/files/etc/init.d/boot3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot
index 2fec48c4f5..346d60d04b 100755
--- a/package/base-files/files/etc/init.d/boot
+++ b/package/base-files/files/etc/init.d/boot
@@ -19,6 +19,9 @@ system_config() {
config_get timezone "$cfg" timezone 'UTC'
echo "$timezone" > /tmp/TZ
+ config_get zonename "$cfg" zonename
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
if [ -x /sbin/syslogd ]; then
local log_ip log_size log_port log_type log_file
config_get log_ip "$cfg" log_ip