]> git.pld-linux.org Git - projects/setup.git/blame - etc/profile
- removed ipv6 (must not smoke so much ;)
[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)
8a243315
JR
45 if [ `id -u` -eq 0 ]; then
46 PS1='[${LOGNAME-$USER}@${HOSTNAME} `
47 if [ "$PWD" = "/${PWD##*/}" ]; then
48 echo $PWD;
49 else
50 echo ${PWD##*/};
51 fi`]# '
52 else
53 PS1='[${LOGNAME-$USER}@${HOSTNAME} `
54 if [ "$PWD" = "/${PWD##*/}" ]; then
55 echo $PWD;
56 else
57 echo ${PWD##*/};
58 fi`]$ '
59 fi
99306191 60 PS2='> '
61 set -o emacs
62 bind '^I'=complete
516614fd 63 bind '^[^I'=complete-list
99306191 64 #
65 # Setup some of the most basic editing functions
66 # to work properly under different termnal emulators.
67 #
68 case $TERM in
69 nxterm|xterm|xterm-color|rxvt)
70 bind '^[[H'=beginning-of-line
71 bind '^[[F'=end-of-line
72 ;;
73 linux)
74 bind '^[1~'=beginning-of-line
75 bind '^[4~'=end-of-line
76 ;;
77 esac
78 ;;
79 zsh)
516614fd 80 PS1="[%m:%~%]# "
99306191 81 ;;
82esac
83
9783a53d
JR
84unset SH
85export PATH PS1 PS2 HOSTNAME HISTFILE HISTSIZE HISTFILESIZE USER LOGNAME MAIL
9bfefe38 86
87for i in /etc/profile.d/*.sh ; do
88 if [ -x $i ]; then
89 . $i
90 fi
91done
92
93unset i
This page took 0.035504 seconds and 4 git commands to generate.