[__timezone] add support for openwrt

This commit is contained in:
Nico Schottelius 2024-08-02 12:05:37 +02:00
parent 3e82b0085b
commit 27471a4a82
2 changed files with 13 additions and 1 deletions

View file

@ -34,3 +34,12 @@ case "$os" in
echo "echo \"$timezone_should\" > /etc/timezone"
;;
esac
case "$os" in
openwrt)
cat <<EOF
uci set system.@system[0].timezone="$timezone_should"
uci commit
EOF
;;
esac

View file

@ -54,6 +54,9 @@ case "$os" in
--delimiter '=' \
--value "\"$timezone\""
;;
openwrt)
: # Uses gencode-remote
;;
*)
echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2
echo "Please contribute an implementation for it if you can." >&2