Comment 1 for bug 486558

Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

In my opinion this is a break of functionality.
A lot of people are custom with tweaking the configrations in /etc/default and will be wondering why things are breaking after migration of there servers to 10.04.

In /etc/default/cron was also the parsing of the system environment tweaked.
The following functionality from cron.init is also missing in cron.upstart
---------------------------------------------------------------------------------------------------------------------
# Read the system's locale and set cron's locale. This locale
# will be inherited by cron (used to set charset of emails)
# and tasks running under it.

parse_environment ()
{
    ENV_FILE="none"
    [ -r /etc/environment ] && ENV_FILE="/etc/environment"
    [ -r /etc/default/locale ] && ENV_FILE="/etc/default/locale"
    [ $ENV_FILE = none ] && return

    for var in LANG LC_ALL LC_CTYPE; do
        value=$(egrep "^[^#]*${var}=" $ENV_FILE | tail -n1 | cut -d= -f2)
        eval $var=$value
    done
}

# Parse the system's environment
if [ "$READ_ENV" = "yes" ] ; then
    export LANG LC_ALL LC_CTYPE
    parse_environment
fi