Introduce new uci-default functions:
        - ucidef_set_timezone TZ

Signed-off-by: John Crispin <j...@phrozen.org>
---
 package/base-files/files/lib/functions/uci-defaults.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
b/package/base-files/files/lib/functions/uci-defaults.sh
index bcc78220cc..67862497c0 100644
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -642,6 +642,13 @@ ucidef_set_hostname() {
        json_select ..
 }
 
+ucidef_set_timezone() {
+       local timezone="$1"
+       json_select_object system
+               json_add_string timezone "$timezone"
+       json_select ..
+}
+
 ucidef_set_wireless() {
        local band="$1"
        local ssid="$2"
-- 
2.34.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to