From fa53a733abbef5a001a5ff9ba1d7b1822e4caae6 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 21 Sep 2024 16:17:17 +0200 Subject: [PATCH] base-files: uci-defaults: allow setting default timezone Introduce new uci-default functions: - ucidef_set_timezone TZ Signed-off-by: John Crispin --- 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 507ddfc11a..4a710aab2c 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.30.2