LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /etc/profile (https://www.linuxquestions.org/questions/linux-newbie-8/etc-profile-51339/)

illtbagu 03-23-2003 03:42 PM

/etc/profile
 
would someone be nice enough to post there /etc/profile for me i have deleted stuff in this file by mistake and my cpu is at full throtle. since im running redhat 8.0 should this file be from a redhat 8.0 system. stupid me i know should have backed it up.

thanks,
AD

david_ross 03-23-2003 04:35 PM

Here you go!
Code:

# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
        if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
          if [ "$2" = "after" ] ; then
              PATH=$PATH:$1
          else
              PATH=$1:$PATH
          fi
        fi
}

# Path manipulation
if [ `id -u` = 0 ]; then
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after

unset pathmunge

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

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

unset i


illtbagu 03-23-2003 04:47 PM

ahhh thanks man appreciate it allot. :)

AD

david_ross 03-23-2003 04:54 PM

Your welcome :D

cuckoopint 03-23-2003 07:19 PM

Quote:

Your welcome
just a little heads up... next time when you post code like that, turn off the smileys...so much easier to read.
; )

david_ross 03-24-2003 12:13 PM

Doh - sorry I was in a rush!

Smilies are now off.


All times are GMT -5. The time now is 08:45 AM.