Commit 720302cf authored by ssrq's avatar ssrq

[type/__timezone] Update sysconfig on SuSE

parent e27ef441
Pipeline #2604 passed with stage
in 1 minute and 26 seconds
......@@ -162,6 +162,28 @@ in
exit 0
fi
;;
(suse)
if test -s "${__global:?}/explorer/os_release"
then
# shellcheck source=cdist/conf/explorer/os_release
os_version=$(. "${__global:?}/explorer/os_release" && echo "${VERSION}")
else
os_version=$(sed -n 's/^VERSION\ *=\ *//p' "${__global:?}/explorer/os_version")
fi
os_major=$(expr "${os_version}" : '\([0-9]\{1,\}\)')
# TODO: Consider using `yast2 timezone ...` instead
if expr "${os_major}" \< 15 \| "${os_major}" = 42
then
# It seems that starting with SuSE 15 /etc/sysconfig/clock is
# abandoned. The file still exists but only contains a
# DEFAULT_TIMEZONE entry.
__key_value /etc/sysconfig/clock:TIMEZONE \
--file /etc/sysconfig/clock \
--delimiter '=' --exact_delimiter \
--key TIMEZONE --value "\"${TZ}\""
fi
;;
(voidlinux)
test -n "${zoneinfo_file}" || invalid_timezone
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment