From: John Crispin Date: Sat, 21 Sep 2024 14:17:17 +0000 (+0200) Subject: base-files: uci-defaults: allow setting default timezone X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=fa53a733abbef5a001a5ff9ba1d7b1822e4caae6;p=openwrt%2Fstaging%2Fpepe2k.git base-files: uci-defaults: allow setting default timezone Introduce new uci-default functions: - ucidef_set_timezone TZ Signed-off-by: John Crispin --- 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"