-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc.docker
More file actions
executable file
·48 lines (32 loc) · 905 Bytes
/
Copy pathbashrc.docker
File metadata and controls
executable file
·48 lines (32 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
#!/bin/bash
# ; -*- mode: shell-script;-*-
# This replaces the standard user .bashrc copied from /etc/skel/.bashrc
LOG=/tmp/setup.log
grep docker /proc/1/cgroup >> $LOG
if [ $? != 0 ]; then
echo "NOT IN CONTAINER"
exit -1
fi
[ -z "$PS1" ] && return
shopt -s checkwinsize
# simple bash prompt
export PS1='\u:\!> '
export TERM=linux
echo -e "\e[m"
alias h="history"
# set PATH so it includes users private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
# display system identification when entering bash
echo "Entering $PWD"
printf "debian ver:%s\n" $(cat /etc/debian_version)
printf "hostname:%s\n" $(cat /etc/hostname)
cat /proc/version
mount_vfs() {
echo "mounting hostdir on $HOME/work"
mkdir -p $HOME/work
sudo mount -t virtiofs hostdir $HOME/work
}
echo "CHECK CONFIGURATION"
echo ". ./set_env; ./bashlib.sh docker_check"