[type/__locale_system] Support old Debian derivatives

This commit is contained in:
Dennis Camera 2020-07-26 12:07:38 +02:00
parent a590504436
commit 47e28fc441

View file

@ -27,8 +27,28 @@
os=$(cat "$__global/explorer/os") os=$(cat "$__global/explorer/os")
case "$os" in case "$os" in
debian|devuan|ubuntu) debian)
os_version=$(cat "${__global}/explorer/os_version")
if expr "${os_version}" '>=' 4 >/dev/null
then
# Debian 4 (etch) and later
locale_conf="/etc/default/locale" locale_conf="/etc/default/locale"
else
locale_conf="/etc/environment"
fi
;;
devuan)
locale_conf="/etc/default/locale"
;;
ubuntu)
os_version=$(cat "${__global}/explorer/os_version")
if expr "${os_version}" '>=' 6.10 >/dev/null
then
# Ubuntu 6.10 (edgy) and later
locale_conf="/etc/default/locale"
else
locale_conf="/etc/environment"
fi
;; ;;
archlinux) archlinux)
locale_conf="/etc/locale.conf" locale_conf="/etc/locale.conf"
@ -61,7 +81,7 @@ case "$os" in
esac esac
__file "$locale_conf" \ __file "$locale_conf" \
--owner root --group root --mode 644 \ --owner root --group root --mode 0644 \
--state exists --state exists
require="__file/$locale_conf" \ require="__file/$locale_conf" \