LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   the content of the /etc/profile in fedora (https://www.linuxquestions.org/questions/linux-newbie-8/the-content-of-the-etc-profile-in-fedora-118512/)

tanbetien 11-21-2003 09:44 AM

the content of the /etc/profile in fedora
 
Hi
I accidentally deleted the /etc/profile, anyone knows the content of it please help posting here, so that I can copy and modify the file again. Or, if you know where to find one on the internet, please help me
I'm using Fedora

fancypiper 11-21-2003 11:25 AM

Here is mine from Red Hat 7.3:
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


fancypiper 11-21-2003 11:27 AM

There is a bug with the code tags, replace the smiles with a colon and right parenthesis

tanbetien 11-21-2003 09:43 PM

Thanks a lot fancypiper , :)


All times are GMT -5. The time now is 01:15 PM.