Changeset 454c7f1 for debian


Ignore:
Timestamp:
Sep 2, 2011 11:55:32 PM (9 years ago)
Author:
kytv <kytv@…>
Branches:
master
Children:
7b974e7
Parents:
3d33524
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/i2p.init

    r3d33524 r454c7f1  
    4242 wrapper.daemonize=TRUE"
    4343
     44for ENV_FILE in /etc/environment /etc/default/locale; do
     45[ -r "$ENV_FILE" ] || continue
     46[ -s "$ENV_FILE" ] || continue
    4447
     48 for var in LANG LANGUAGE LC_ALL LC_CTYPE; do
     49     value=`egrep "^${var}=" "$ENV_FILE" | tail -n1 | cut -d= -f2`
     50     [ -n "$value" ] && eval export $var=$value
     51
     52     if [ -n "$value" ] && [ "$ENV_FILE" = /etc/environment ]; then
     53         log_warning_msg "/etc/environment has been deprecated for locale information; use /etc/default/locale for $var=$value instead"
     54     fi
     55 done
     56done
    4557
    4658# this isn't really needed since we depend on lsb-base (>= 3.2-14)
Note: See TracChangeset for help on using the changeset viewer.