You are not logged in.

#1 2010-04-04 11:24:15

splicer
Member
Registered: 2009-10-30
Posts: 11

Can anyone post a mostly-default /etc/profile? I deleted mine -.-

I was trying out some vim commands and accidentally wiped my /etc/profile -.-

I've replaced some of the basic stuff like $PATH, but it still looks far shorter than the previous version. I also found some other examples on the web but I'd like to have the Arch defaults back and customize from there (: Could someone post theirs? Thanks a bunch.

Offline

#2 2010-04-04 11:42:40

hullap
Member
From: New Delhi, India
Registered: 2008-08-17
Posts: 84
Website

Re: Can anyone post a mostly-default /etc/profile? I deleted mine -.-

$ cat /etc/profile

# 
# /etc/profile
#
# This file is intended to be used for ALL common
# Bourne-compatible shells. Shell specifics should be
# handled in /etc/profile.$SHELL where $SHELL is the name
# of the binary being run (discounting symlinks)
#
# Sections taken from SuSe's /etc/profile
# Note the explicit use of 'test' to cover all bases
#  and potentially incompatible shells

#Determine our shell without using $SHELL, which may lie
shell="sh"
if test -f /proc/mounts; then
   case $(/bin/ls -l /proc/$$/exe) in
        *bash) shell=bash ;;
        *dash) shell=dash ;;
        *ash)  shell=ash ;;
        *ksh)  shell=ksh ;;
        *zsh)  shell=zsh ;;
    esac
fi

# Load shell specific profile settings
test -f "/etc/profile.$shell" &&  . "/etc/profile.$shell"

#Set our umask
umask 022

# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export PATH

# Export default pkg-config path
PKG_CONFIG_PATH="/usr/lib/pkgconfig"
export PKG_CONFIG_PATH

# Some readline stuff that is fairly common
HISTSIZE=1000
HISTCONTROL="erasedups"

INPUTRC="/etc/inputrc"
LESS="-R"

export HISTSIZE HISTCONTROL INPUTRC LESS

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
    for profile in /etc/profile.d/*.sh; do
        test -x $profile && . $profile
    done
    unset profile
fi

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH

And, you could retrieve that file from core/filesystem too.

Last edited by hullap (2010-04-04 11:52:47)

Offline

#3 2010-04-04 12:01:46

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: Can anyone post a mostly-default /etc/profile? I deleted mine -.-

pacman -S filesystem and you are done smile

Offline

#4 2010-04-04 12:20:49

splicer
Member
Registered: 2009-10-30
Posts: 11

Re: Can anyone post a mostly-default /etc/profile? I deleted mine -.-

Heh, I had tried to reinstall bash with no success tongue thanks for pointing me to filesystem!

Offline

#5 2010-04-04 12:24:59

ehlo
Member
From: England
Registered: 2010-04-04
Posts: 66

Re: Can anyone post a mostly-default /etc/profile? I deleted mine -.-

Hopefully this will encourage you to implement decent backups! smile

Incidentally if you have a second arch machine you can use "pacman -Qo /etc/profile" to find the package that contains the file. It would be helpful if there was an online version of this for common packages however I'm not aware of one?

Offline

#6 2010-04-04 13:33:57

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Can anyone post a mostly-default /etc/profile? I deleted mine -.-

@ ehlo

pacman -S pkgtools

[thestinger@arch packages]$ pkgfile /etc/profile
core/filesystem

you can use pkgfile for any file owned by a package in the repos - it keeps a little database in /var and updates it with a cronjob

Offline

#7 2010-04-04 16:41:50

ehlo
Member
From: England
Registered: 2010-04-04
Posts: 66

Re: Can anyone post a mostly-default /etc/profile? I deleted mine -.-

Thanks, thestinger.
/me goes to install

Offline

Board footer

Powered by FluxBB