diff options
author | John Crispin <blogic@openwrt.org> | 2008-06-11 19:59:16 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2008-06-11 19:59:16 +0000 |
commit | e9f32f86481cec385ff05750aeaa1fe621ea84c2 (patch) | |
tree | e86cee2295718206b73a7134728ff5e3048a8c21 | |
parent | c857936b93d89023c86c7cbf84b279c9fa9b382c (diff) | |
download | upstream-e9f32f86481cec385ff05750aeaa1fe621ea84c2.tar.gz upstream-e9f32f86481cec385ff05750aeaa1fe621ea84c2.tar.bz2 upstream-e9f32f86481cec385ff05750aeaa1fe621ea84c2.zip |
system now knows which timezone it is in
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11445 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/base-files/Makefile | 2 | ||||
-rw-r--r-- | package/base-files/files/etc/config/system | 1 | ||||
-rwxr-xr-x | package/base-files/files/etc/init.d/boot | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index b80fee3ff7..bec33c8e05 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -161,7 +161,7 @@ define Package/base-files$(TARGET)/install rm -f $(1)/var ln -sf /tmp $(1)/var mkdir -p $(1)/etc - ln -sf /tmp/resolv.conf /tmp/fstab $(1)/etc/ + ln -sf /tmp/resolv.conf /tmp/fstab /tmp/TZ $(1)/etc/ $(call Package/base-files/install-target,$(1)) for conffile in $(1)/etc/config/*; do \ if [ -f "$$$$conffile" ]; then \ diff --git a/package/base-files/files/etc/config/system b/package/base-files/files/etc/config/system index 204a73a986..b0726b7b7b 100644 --- a/package/base-files/files/etc/config/system +++ b/package/base-files/files/etc/config/system @@ -1,2 +1,3 @@ config system option hostname OpenWrt + option timezone UTC diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index df2afd6b8e..57c034eb48 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -12,6 +12,10 @@ system_config() { config_get conloglevel "$cfg" conloglevel [ -n "$conloglevel" ] && dmesg -n "$conloglevel" + + config_get timezone "$cfg" timezone + [ -z "$timezone" ] && timezone=UTC + echo "$timezone" > /tmp/TZ config_get log_ip "$cfg" log_ip config_get log_size "$cfg" log_size |