Add initial CentOS 3.9 root filesystem structure and essential scripts
- Created default user environment files: .bash_logout, .bash_profile, and .bashrc. - Added symbolic links for dynamic linker and various libraries. - Included essential binaries in /sbin for system management (e.g., fdisk, mkfs, hwclock). - Implemented RPM verification script to check availability of required packages in CentOS vault. - Established basic directory structure for logs and mail. - Added a tarball for external libraries.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# /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
|
||||
Reference in New Issue
Block a user