base-files: add timezone to UCI during config_generate
authorJohn Crispin <john@phrozen.org>
Sat, 21 Sep 2024 14:19:24 +0000 (16:19 +0200)
committerJohn Crispin <john@phrozen.org>
Wed, 2 Oct 2024 13:41:33 +0000 (15:41 +0200)
Signed-off-by: John Crispin <john@phrozen.org>
package/base-files/files/bin/config_generate

index be21d0079a8a7ff411bef57d1dde3c0add9f7bbd..9d1968ce206006b437c40c9ca84a7494a5fbd3aa 100755 (executable)
@@ -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