mirror of https://github.com/hak5/openwrt.git
base-files: allow timezone to be overriden by zonename (proper zoneinfo support)
Signed-off-by: Roman Yeryomin <roman@advem.lv> SVN-Revision: 47980lede-17.01
parent
7029ee5abe
commit
3f78186f76
|
@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||||
include $(INCLUDE_DIR)/version.mk
|
include $(INCLUDE_DIR)/version.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=164
|
PKG_RELEASE:=165
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
PKG_BUILD_DEPENDS:=usign/host
|
PKG_BUILD_DEPENDS:=usign/host
|
||||||
|
@ -161,7 +161,7 @@ define Package/base-files/install
|
||||||
rm -f $(1)/var
|
rm -f $(1)/var
|
||||||
$(LN) /tmp $(1)/var
|
$(LN) /tmp $(1)/var
|
||||||
mkdir -p $(1)/etc
|
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 0600 $(1)/etc/shadow
|
||||||
chmod 1777 $(1)/tmp
|
chmod 1777 $(1)/tmp
|
||||||
|
|
|
@ -27,7 +27,8 @@ system_config() {
|
||||||
echo "$hostname" > /proc/sys/kernel/hostname
|
echo "$hostname" > /proc/sys/kernel/hostname
|
||||||
[ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
|
[ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
|
||||||
echo "$timezone" > /tmp/TZ
|
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
|
# apply timezone to kernel
|
||||||
date -k
|
date -k
|
||||||
|
|
Loading…
Reference in New Issue