# /etc/profile

umask 022

# UTF-8 mód bekapcsolása, segítendő a távoli belépést.
if [ -t 1 -a "$(locale charmap)" = "UTF-8" ]; then
	echo -ne '\e%G'
fi

for i in /etc/profile.d/*.sh /etc/profile.local; do
	if [ -f "$i" -a -r "$i" ]; then
		. "$i"
	fi
done
unset i

SHELL=${SHELL:-${BASH:-/bin/bash}}

PAGER=less
LESS='-iMS'

# Setup some environment variables.
export HISTSIZE=10000
export HISTCONTROL=ignoredups:erasedups

# Set some defaults for graphical systems
export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share/}
export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg/}
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER}

# Set default locale
if [ -z $LANG ]; then
export LANG="$(</etc/sysconfig/locale)"
fi

# /etc/bashrc-t és ~/.bashrc-t csak az interaktív shellek hajtják végre.
if [ "${-//[^i]/}" != "" ]; then
	if [ -r /etc/bashrc ]; then
		. /etc/bashrc
	fi
	if [ -r ~/.bashrc ]; then
		. ~/.bashrc
	fi
fi
