base-files: use "zonename" system option to symlink /etc/localtime via /tmp/localtime...
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 26 Sep 2011 02:28:04 +0000 (02:28 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 26 Sep 2011 02:28:04 +0000 (02:28 +0000)
SVN-Revision: 28306

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

index 775126aa5315d463051fdd89f8fa75c6caafbd44..713dd7fad540606f25b6e1aa57b0ad9b8e8239dc 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=80
+PKG_RELEASE:=81
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
@@ -513,6 +513,8 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
 
   define Package/glibc/install
        $(CP) ./glibc-files/* $(1)/
+       rm -f $(1)/etc/localtime
+       ln -sf /tmp/localtime $(1)/etc/localtime
        $(INSTALL_DIR) $(1)/lib
        $(CP) \
                $(TOOLCHAIN_DIR)/lib/ld*.so.* \
index 2fec48c4f5d05e7265633657370d36680ed8e03c..346d60d04b92a3a71ce0200afcf17ebcd440b616 100755 (executable)
@@ -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