#!/bin/sh # unset some env vars unset CSREGISTRY unset CSHOME unset CSBIN unset CSLIB unset COM_LAYER unset LIBPATH unset LD_LIBRARY_PATH unset SHLIB_PATH # let us make sure that we always get this from OS. if [ -r /etc/environment ]; then LANG=`/usr/bin/cat /etc/environment | /usr/bin/awk -F "=" '/LANG/ {print $2}'` fi CHILI_EXE_PATH="/bin:/sbin:/usr/bin:/usr/sbin" if [ -z "$PATH" ]; then PATH="$CHILI_EXE_PATH" else PATH="$PATH:$CHILI_EXE_PATH" fi locale=`locale 2>/dev/null` nolocale=`echo $locale | grep 'no locale in' 2>/dev/null` if [ -z "$locale" -a -n "$nolocale" ]; then # Default to "C" for the locale if no locale function can be found. LC_ALL="C" elif [ -z "$LC_ALL" ]; then if [ -n "$LANG" ]; then LC_ALL="$LANG" else LC_ALL="C" fi fi # Invoke the locale function and fill in any missing locale values. for each in $locale ; do LOCALE_VAR=`echo $each | sed 's/=.*//'` if `env | grep -E "$LOCALE_VAR=" >/dev/null 2>&1` [ $? -ne 0 ]; then eval $each export $LOCALE_VAR fi done if [ -z "$LANG" ]; then LANG="$LC_ALL" fi if [ -z "$LANGUAGE" ]; then LANGUAGE="$LC_ALL" fi if [ -z "$LINGUAS" ]; then LINGUAS="$LC_ALL" fi # now execute the arg $@