Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
deleted /etc/profile [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
forkboy
Apprentice
Apprentice


Joined: 24 Nov 2004
Posts: 200
Location: Blackpool, UK

PostPosted: Mon Sep 04, 2006 11:03 am    Post subject: deleted /etc/profile [solved] Reply with quote

I don't know how but I've deleted my /etc/profile, I can't find and info on what this does either, I know this is a very dumb mistake can anyone help?

Last edited by forkboy on Mon Sep 04, 2006 11:23 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Mon Sep 04, 2006 11:19 am    Post subject: Reply with quote

forkboy.

Here you are - from a ~x86 install. It comes from baselayout, so regard this as a get-u-going while you emerge baselayout to get the right /etc/profile for you.

Code:
# /etc/profile: login shell setup
#
# That this file is used by any Bourne-shell derivative to setup the
# environment for login shells.
#

# Load environment settings from profile.env, which is created by
# env-update from the files in /etc/env.d
if [ -e /etc/profile.env ] ; then
        . /etc/profile.env
fi

# 077 would be more secure, but 022 is generally quite realistic
umask 022

# Set up PATH depending on whether we're root or a normal user.
# There's no real reason to exclude sbin paths from the normal user,
# but it can make tab-completion easier when they aren't in the
# user's PATH to pollute the executable namespace.
#
# It is intentional in the following line to use || instead of -o.
# This way the evaluation can be short-circuited and calling whoami is
# avoided.
if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
        PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
else
        PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
fi
export PATH
unset ROOTPATH

# Extract the value of EDITOR
[ -z "$EDITOR" ] && EDITOR="`. /etc/rc.conf 2>/dev/null; echo $EDITOR`"
[ -z "$EDITOR" ] && EDITOR="/bin/nano"
export EDITOR

if [ -n "${BASH_VERSION}" ] ; then
        # Newer bash ebuilds include /etc/bash/bashrc which will setup PS1
        # including color.  We leave out color here because not all
        # terminals support it.
        if [ -f /etc/bash/bashrc ] ; then
                # Bash login shells run only /etc/profile
                # Bash non-login shells run only /etc/bash/bashrc
                # Since we want to run /etc/bash/bashrc regardless, we source it
                # from here.  It is unfortunate that there is no way to do
                # this *after* the user's .bash_profile runs (without putting
                # it in the user's dot-files), but it shouldn't make any
                # difference.
                . /etc/bash/bashrc
        else
                PS1='\u@\h \w \$ '
        fi
else
        # Setup a bland default prompt.  Since this prompt should be useable
        # on color and non-color terminals, as well as shells that don't
        # understand sequences such as \h, don't put anything special in it.
        PS1="`whoami`@`uname -n | cut -f1 -d.` \$ "
fi

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

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Mon Sep 04, 2006 11:22 am    Post subject: Reply with quote

sys-apps/baselayout provides /etc/profile, so you could try re-emerging it. Be careful not to overwrite your customized config files using etc-update afterwards.
Back to top
View user's profile Send private message
forkboy
Apprentice
Apprentice


Joined: 24 Nov 2004
Posts: 200
Location: Blackpool, UK

PostPosted: Mon Sep 04, 2006 11:23 am    Post subject: Reply with quote

Sorted. Thanks very much.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum