diff mbox series

[10/11] base-files: add timezone to UCI during config_generate

Message ID 20240923171825.148902-11-john@phrozen.org
State Under Review
Delegated to: John Crispin
Headers show
Series allow loading default credentials from flash | expand

Commit Message

John Crispin Sept. 23, 2024, 5:18 p.m. UTC
Signed-off-by: John Crispin <john@phrozen.org>
---
 package/base-files/files/bin/config_generate | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate
index be21d0079a..9d1968ce20 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -341,6 +341,11 @@  generate_static_system() {
 				uci -q set "system.@system[-1].compat_version=1.0"
 			fi
 
+			local timezone
+			if json_get_var timezone timezone; then
+				uci -q set "system.@system[-1].timezone=$timezone"
+			fi
+
 			if json_is_a ntpserver array; then
 				local keys key
 				json_get_keys keys ntpserver