]> git.sur5r.net Git - bacula/rescue/blob - rescue/linux/cdrom/roottree/etc/profile
Initial revision
[bacula/rescue] / rescue / linux / cdrom / roottree / etc / profile
1 # /etc/profile
2
3 # System wide environment and startup programs, for login setup
4 # Functions and aliases go in /etc/bashrc
5
6 pathmunge () {
7         if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
8            if [ "$2" = "after" ] ; then
9               PATH=$PATH:$1
10            else
11               PATH=$1:$PATH
12            fi
13         fi
14 }
15
16 # Path manipulation
17 if [ `id -u` = 0 ]; then
18         pathmunge /sbin
19         pathmunge /usr/sbin
20         pathmunge /usr/local/sbin
21 fi
22
23 pathmunge /usr/X11R6/bin after
24
25 unset pathmunge
26
27 # No core files by default
28 ulimit -S -c 0 > /dev/null 2>&1
29
30 USER="`id -un`"
31 LOGNAME=$USER
32 MAIL="/var/spool/mail/$USER"
33
34 HOSTNAME=`/bin/hostname`
35 HISTSIZE=1000
36
37 if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
38     INPUTRC=/etc/inputrc
39 fi
40
41 export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
42
43 for i in /etc/profile.d/*.sh ; do
44     if [ -r "$i" ]; then
45         . $i
46     fi
47 done
48
49 unset i