system now knows which timezone it is in
authorJohn Crispin <john@openwrt.org>
Wed, 11 Jun 2008 19:59:16 +0000 (19:59 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 11 Jun 2008 19:59:16 +0000 (19:59 +0000)
SVN-Revision: 11445

package/base-files/Makefile
package/base-files/files/etc/config/system
package/base-files/files/etc/init.d/boot

index b80fee3ff700776be5e109c2edd9f9ec042d24d9..bec33c8e05dd32b31bb05a4e5534c52c954c3849 100644 (file)
@@ -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 \
index 204a73a9868cb13fa8a5735dcf35ac0953a8d088..b0726b7b7bb9112cc19c02c33b5deddf7c5b3725 100644 (file)
@@ -1,2 +1,3 @@
 config system
        option hostname OpenWrt
+       option timezone UTC
index df2afd6b8ed4040f34a8637deba5b3e298c795b7..57c034eb48f20f5dce632b6ba6e10fabe7dba9a1 100755 (executable)
@@ -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