##########################################################################
# file:        SessionEnvironmentVariables
# description: Environment variable setup common to all session scripts.
#
# This file is to be sourced in all session scripts in the
# /etc/X11/gdm/Sessions directory. It must be sourced, not executed as a
# child process, for the environment variables to initialize properly. 
#
##########################################################################


awk -f/bin/cmdline_export_awk /proc/cmdline > /tmp/cmdline_export
for envfile in "/tmp/cmdline_export" "/etc/environment" "/tmp/environment" 
do
   if [ -r "$envfile" ]; then
      set -a
      . $envfile
      set +a
   fi
done
rm -f /tmp/cmdline_export


# Export the keyboard type for IBM emulators.
if [ -r /etc/sysconfig/keyboard ]; then
   . /etc/sysconfig/keyboard
   export KEYTABLE
fi


export MACADDRESS=`/sbin/ifconfig $adapter | grep HWaddr | awk '{print $NF}'`


for envfile in "$HOME/IBM/IBMSetupEnvPrefs" "/etc/sysconfig/IBMSetupEnvPrefs" 
do
   if [ -r "$envfile" ]; then
      set -a
      . $envfile
      set +a

      break
   fi
done

for envfile in "$HOME/IBM/IBMSetupInformationBlock" "/etc/sysconfig/IBMSetupInformationBlock" 
do
   if [ -r "$envfile" ]; then
      . $envfile
      if [ -n "$defaultprinter" ]; then export PRINTER=$defaultprinter; fi

      break
   fi
done



