summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions29
1 files changed, 9 insertions, 20 deletions
diff --git a/functions b/functions
index 506ce0f..6ca3e43 100644
--- a/functions
+++ b/functions
@@ -5,11 +5,10 @@
# sanitize PATH (will be overridden later when /etc/profile is sourced but is useful for udev)
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-localevars=(LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY
- LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE
- LC_MEASUREMENT LC_IDENTIFICATION LC_ALL)
+# clear the TZ envvar, so daemons always respect /etc/localtime
+unset TZ
-vconsolevars=(KEYMAP KEYMAP_TOGGLE FONT FONT_MAP FONT_UNIMAP)
+. /etc/profile.d/locale.sh
if [[ $1 == "start" ]]; then
if [[ $STARTING ]]; then
@@ -66,12 +65,6 @@ if (( $? != 3 )); then
fi
unset TERM_COLORS
-# clear the TZ envvar, so daemons always respect /etc/localtime
-unset TZ
-
-# sanitize the locale settings
-unset "${localevars[@]}"
-
unquote() {
local -r quotes=$'[\'"]'
@@ -137,6 +130,10 @@ deltext() {
printf "${DEL_TEXT}"
}
+print_depr() {
+ printf "${C_FAIL} ${1} is deprecated. See ${2} for details.${C_CLEAR} \n"
+}
+
printhl() {
printf "${C_OTHER}${PREFIX_HL} ${C_H1}${1}${C_CLEAR} \n"
}
@@ -367,6 +364,7 @@ load_modules() {
local rc=0
if [[ $MODULES ]]; then
+ print_depr "MODULES=" "rc.conf(5) and modules-load.d(5)"
/usr/lib/systemd/arch-modules-load
rc=$?
fi
@@ -414,7 +412,7 @@ do_unlock_legacy() {
# $2 = source device
# $3 = password
# $4 = options
- printf "${C_FAIL}Using legacy crypttab format. This will stop working in the future. See crypttab(5).${C_CLEAR}\n"
+ print_depr "The legacy crypttab format" "crypttab(5)"
local open=create a=$1 b=$2 failed=0
# Ordering of options is different if you are using LUKS vs. not.
# Use ugly swizzling to deal with it.
@@ -742,15 +740,6 @@ if (( RC_FUNCTIONS_HOOK_FUNCS_DEFINED != 1 )); then
declare -r RC_FUNCTIONS_HOOK_FUNCS_DEFINED=1
fi
-if [[ $DAEMON_LOCALE != [nN][oO] ]]; then
- export LANG=${LOCALE:-C}
- if [[ -r /etc/locale.conf ]]; then
- parse_envfile /etc/locale.conf "${localevars[@]}"
- fi
-else
- export LANG=C
-fi
-
# set colors
if [[ $USECOLOR != [nN][oO] ]]; then
if tput setaf 0 &>/dev/null; then