I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 454c7f14 authored by kytv's avatar kytv
Browse files

Debian: get locale information by sourcing /etc/environment and

/etc/default/locale, if found. This prevents a problem with the encoding being
set to ANSI_X3.4-1968 when I2P is started at boot.
parent 3d335243
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,19 @@ I2P_ARGS="/etc/i2p/wrapper.config \ ...@@ -41,7 +41,19 @@ I2P_ARGS="/etc/i2p/wrapper.config \
wrapper.java.pidfile=$JVMPIDFILE \ wrapper.java.pidfile=$JVMPIDFILE \
wrapper.daemonize=TRUE" wrapper.daemonize=TRUE"
for ENV_FILE in /etc/environment /etc/default/locale; do
[ -r "$ENV_FILE" ] || continue
[ -s "$ENV_FILE" ] || continue
for var in LANG LANGUAGE LC_ALL LC_CTYPE; do
value=`egrep "^${var}=" "$ENV_FILE" | tail -n1 | cut -d= -f2`
[ -n "$value" ] && eval export $var=$value
if [ -n "$value" ] && [ "$ENV_FILE" = /etc/environment ]; then
log_warning_msg "/etc/environment has been deprecated for locale information; use /etc/default/locale for $var=$value instead"
fi
done
done
# this isn't really needed since we depend on lsb-base (>= 3.2-14) # this isn't really needed since we depend on lsb-base (>= 3.2-14)
## Actually, we *do* need this since the versioned dependency has been dropped ## Actually, we *do* need this since the versioned dependency has been dropped
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment