[openwrt/openwrt] base-files: fix luci TZ default show zonename
LEDE Commits
lede-commits at lists.infradead.org
Thu Dec 12 10:55:00 PST 2024
blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4a083833399077f54e8ff40a49d688d4c5c9e762
commit 4a083833399077f54e8ff40a49d688d4c5c9e762
Author: Jiale Liu <admin at licsber.site>
AuthorDate: Mon Apr 15 00:27:49 2024 +0800
base-files: fix luci TZ default show zonename
fix default timezone to correct GMT0,
origin value 'UTC' is zonename, not timezone.
Signed-off-by: Jiale Liu <admin at licsber.site>
Link: https://github.com/openwrt/openwrt/pull/15128
Signed-off-by: John Crispin <john at phrozen.org>
---
package/base-files/files/bin/config_generate | 3 ++-
package/base-files/files/etc/init.d/system | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate
index ca40a62cd4..fecf82fcaa 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -312,7 +312,8 @@ generate_static_system() {
delete system. at system[0]
add system system
set system. at system[-1].hostname='OpenWrt'
- set system. at system[-1].timezone='UTC'
+ set system. at system[-1].timezone='GMT0'
+ set system. at system[-1].zonename='UTC'
set system. at system[-1].ttylogin='0'
set system. at system[-1].log_size='128'
set system. at system[-1].urandom_seed='0'
diff --git a/package/base-files/files/etc/init.d/system b/package/base-files/files/etc/init.d/system
index dcfc2616c6..cff2d87072 100755
--- a/package/base-files/files/etc/init.d/system
+++ b/package/base-files/files/etc/init.d/system
@@ -9,8 +9,8 @@ validate_system_section() {
'hostname:string:OpenWrt' \
'conloglevel:uinteger' \
'buffersize:uinteger' \
- 'timezone:string:UTC' \
- 'zonename:string'
+ 'timezone:string:GMT0' \
+ 'zonename:string:UTC'
}
system_config() {
More information about the lede-commits
mailing list