← Back to team overview

epoptes team mailing list archive

Re: [Question #235416]: Epoptes is running commands with wrong locale

 

Question #235416 on Epoptes changed:
https://answers.launchpad.net/epoptes/+question/235416

    Status: Needs information => Open

Laércio de Sousa gave more information on the question:
Hey, I guess I've found the bug!

The script /usr/sbin/epoptes-client tries to source a file named
/lib/lsb/init-functions, which should provide shell functions
log_begin_msg() and log_end_msg() on Debian-based systems.

This file also exists in openSUSE 12.3, but with the contents below:


#
# Define init LSB shell functions
#

#
# Source SuSE's rc functions
#
. /etc/rc.status

#
# Be sure that  start_daemon, killproc, and
# pidofproc will be script functions.
#
function start_daemon ()
{
    /sbin/start_daemon ${1+"$@"}
}

function killproc ()
{
    /sbin/killproc ${1+"$@"}
}

function pidofproc ()
{
    /sbin/pidofproc ${1+"$@"}
}

#
# Logging of succes messages
#
function log_success_msg ()
{
    echo -en "$@"
    echo -e  "$rc_done"
}

#
# Logging of failure messages
#
function log_failure_msg ()
{
    echo -en "$@"
    echo -e  "$rc_failed"
}

#
# Logging of warn messages
#
function log_warning_msg ()
{
    echo -en "$@"
    echo -e  "${stat}${attn} warning${norm}"
}

As you can see, this version of /lib/lsb/init-functions does NOT provide
the desired functions log_begin_msg() and log_end_msg(). Moreover, it
sources /etc/rc.status, which injects that undesirable LC_ALL=POSIX.

I've editted my /usr/sbin/epoptes-client, commenting the part that
sources /lib/lsb/init-functions, rebooted my system and... voilà:
Epoptes now executes my programs with the right locale.

BTW: I've tried to enter IRC channel, but freenode.net has banned me:

You are banned from this server- Your host is an open proxy (HTTP
CONNECT (Mikrotik-style) (3128)).  Email proxyscan@xxxxxxxxxxxx when
corrected. (2013/9/16 08.38)

It seems freenode.net doesn't like my current squid setup. I'll check it
later, so we can chat on IRC channel in other opportunities.

-- 
You received this question notification because you are a member of
Epoptes Developers, which is an answer contact for Epoptes.