diff options
author | John Crispin <blogic@openwrt.org> | 2015-12-23 14:44:31 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-12-23 14:44:31 +0000 |
commit | 5daf93b096cc49b1ac91b9b9519af010f961030c (patch) | |
tree | dfbbe742ef81710be6f0741ed65218e5154139d1 | |
parent | f5cb31b10d81453a0ffe4b02b39a53ab144326a5 (diff) | |
download | master-187ad058-5daf93b096cc49b1ac91b9b9519af010f961030c.tar.gz master-187ad058-5daf93b096cc49b1ac91b9b9519af010f961030c.tar.bz2 master-187ad058-5daf93b096cc49b1ac91b9b9519af010f961030c.zip |
base-files: allow timezone to be overriden by zonename (proper zoneinfo support)
Signed-off-by: Roman Yeryomin <roman@advem.lv>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47980 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/base-files/Makefile | 4 | ||||
-rwxr-xr-x | package/base-files/files/etc/init.d/system | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 1367fa9291..bf32f6306a 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/version.mk PKG_NAME:=base-files -PKG_RELEASE:=164 +PKG_RELEASE:=165 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ PKG_BUILD_DEPENDS:=usign/host @@ -161,7 +161,7 @@ define Package/base-files/install rm -f $(1)/var $(LN) /tmp $(1)/var mkdir -p $(1)/etc - $(LN) /tmp/resolv.conf /tmp/fstab /tmp/TZ $(1)/etc/ + $(LN) /tmp/resolv.conf /tmp/fstab /tmp/TZ /tmp/localtime $(1)/etc/ chmod 0600 $(1)/etc/shadow chmod 1777 $(1)/tmp 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 |