#!/bin/sh
# A script so that
#    1) we read the standard system env vars
#    2) syadmins/integrators can add their own private options etc...

test -f /var/tmp/orbit-gdm/bonobo-activation-server-ior && rm /var/tmp/orbit-gdm/bonobo-activation-server-ior

test -f /etc/profile && . /etc/profile

#Try to set LC_MESSAGES to LANG if neither LC_MESSAGES or LC_ALL is set.
#This ensures that gdm can display in a system's default language if only
#LANG is set.

# make sure LANG should be set
if [ -z "$LANG" ]
then
  test -f /etc/sysconfig/language && export LANG=`. /etc/sysconfig/language; echo $RC_LANG`
fi
if [ -z "$LC_MESSAGES" ]
then
    if [ -z "$LC_ALL" ]
    then
        LC_MESSAGES=$LANG
        export LC_MESSAGES
    fi
fi

exec /usr/bin/gdm-binary "$@"

# fallback, use PATH
exec gdm-binary "$@"
