-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc_user_redhat.master
More file actions
47 lines (39 loc) · 905 Bytes
/
bashrc_user_redhat.master
File metadata and controls
47 lines (39 loc) · 905 Bytes
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
# .bashrc
<tmpl_if name='jailkit_chroot' op='==' value='y'>
export TERM=xterm
</tmpl_if>
# Source global definitions first
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
<tmpl_if name='jailkit_chroot' op='==' value='y'>
## Hack for Jailkit User to change back to the logged in user ##
if [ -n "$LOGNAME" ]; then
if [ "$LOGNAME" != $USER ]; then
export HOME=<tmpl_var name='home_dir'>$LOGNAME
export USER=$LOGNAME
export USERNAME=$LOGNAME
cd $HOME
fi
fi
</tmpl_if>
## Change machine hostname to site domain ##
export HOSTNAME=<tmpl_var name='domain'>
export PS1='\u@<tmpl_var name='domain'> \w\$ '
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
# Source custom bashrc files
if [ -d ~/.bashrc.d ]
then
for brc in ~/.bashrc.d/*
do
if [ -f "$brc" ]; then
. "$brc"
fi
done
fi
unset brc