]> git.pld-linux.org Git - projects/setup.git/blame - etc/profile
- added ipv6 41
[projects/setup.git] / etc / profile
CommitLineData
9bfefe38 1# /etc/profile
2
3# System wide environment and startup programs
99306191 4# Functions and aliases go into the shells dependent startup files
9bfefe38 5
6PATH="$PATH:/usr/X11R6/bin"
9bfefe38 7
9bfefe38 8if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
b62ea61b 9 umask 002
9bfefe38 10else
b62ea61b 11 umask 022
9bfefe38 12fi
13
14USER=`id -un`
15LOGNAME=$USER
b62ea61b 16MAIL="/var/mail/$USER"
9bfefe38 17
18HOSTNAME=`/bin/hostname`
9783a53d 19HISTFILE="$HOME/.history"
9bfefe38 20HISTSIZE=1000
21HISTFILESIZE=1000
99306191 22
23#
24# Setup the environment for varius shells
25#
26
b62ea61b
JR
27if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then
28 TERM=linux
29fi
30
9783a53d 31SH="${0#\-}"
558c4ec4 32if [ "$SH" = "sh" ]; then
516614fd 33 if [ -n "$KSH_VERSION" ]; then
9783a53d 34 SH=ksh
516614fd 35 elif [ -n "$BASH_VERSION" ]; then
9783a53d
JR
36 SH=bash
37 fi
38fi
39
40case "$SH" in
99306191 41 bash)
516614fd 42 PS1="[\u@\h \W]\\$ "
99306191 43 ;;
44 ksh|pdksh)
516614fd
JR
45 PS1='[${LOGNAME-$USER}@${HOSTNAME} `
46 if [ "$PWD" = "/${PWD##*/}" ]; then
99306191 47 echo $PWD;
48 else
516614fd
JR
49 echo ${PWD##*/};
50 fi`]'$PS1
99306191 51 PS2='> '
52 set -o emacs
53 bind '^I'=complete
516614fd 54 bind '^[^I'=complete-list
99306191 55 #
56 # Setup some of the most basic editing functions
57 # to work properly under different termnal emulators.
58 #
59 case $TERM in
60 nxterm|xterm|xterm-color|rxvt)
61 bind '^[[H'=beginning-of-line
62 bind '^[[F'=end-of-line
63 ;;
64 linux)
65 bind '^[1~'=beginning-of-line
66 bind '^[4~'=end-of-line
67 ;;
68 esac
69 ;;
70 zsh)
516614fd 71 PS1="[%m:%~%]# "
99306191 72 ;;
73esac
74
9783a53d
JR
75unset SH
76export PATH PS1 PS2 HOSTNAME HISTFILE HISTSIZE HISTFILESIZE USER LOGNAME MAIL
9bfefe38 77
78for i in /etc/profile.d/*.sh ; do
79 if [ -x $i ]; then
80 . $i
81 fi
82done
83
84unset i
This page took 0.044333 seconds and 4 git commands to generate.