blob: 2c2b70ac27dd2b61f68ae065c43cff85976f1756 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
#########################################################################
# /etc/profile: System-wide initialisation file for Bourne shells #
#########################################################################
# [JNZ] Modified 21-Jun-2013
# This script file is sourced by Bourne-compatible shells, such as sh(1),
# bash(1), ksh(1) and ash(1), when those shells are run as a login shell.
#
# When a login shell starts, the following script files are sourced, in
# this order:
#
# /etc/profile - this file
# /etc/profile.d/*.sh - additional profile scripts
# /etc/bash.bashrc - sourced by this file (only for bash(1))
# $HOME/.bash_profile - run by bash(1)
# $HOME/.bashrc - sourced by the default $HOME/.bash_profile
#
# When a normal (non-login) bash(1) shell starts, the following files are
# sourced:
#
# /etc/bash.bashrc - run by bash(1)
# $HOME/.bashrc - run by bash(1)
#
# Written by John Zaitseff and released into the public domain.
umask 022
# Set the default executable path, as ENV_PATH and ENV_SUPATH in
# /etc/login.defs does not always seem to be consulted
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
# Augment various paths as required
if [ -d $HOME/bin ]; then
PATH=$HOME/bin:$PATH
fi
if [ -d $HOME/man ]; then
MANPATH=$HOME/man:$MANPATH
export MANPATH
fi
if [ -d $HOME/lib/man ]; then
MANPATH=$HOME/lib/man:$MANPATH
export MANPATH
fi
export PATH
# Set the default prompt for interactive shells
if [ "$PS1" ]; then
if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
PS1="\u@\h:\w \\\$ "
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
# Source all *.sh scripts in /etc/profile.d
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r "$i" ]; then
. "$i"
fi
done
unset i
fi
# If this is a bash(1) shell, source an additional initialisation script.
# This may override variables, functions and aliases set above.
if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
if [ -r /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
fi
|