Initial commit
This commit is contained in:
55
customcd/files/bin/bashlogin
Normal file
55
customcd/files/bin/bashlogin
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
# ============ ENV VARS ================================
|
||||
cd /root
|
||||
export LANG=en_US.utf8
|
||||
export HOME=/root
|
||||
export SHELL=/bin/bash
|
||||
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/root/rescuebru
|
||||
export path="/sbin /bin /usr/sbin /usr/bin /root/rescuebru"
|
||||
export MAIL=/var/mail/root
|
||||
export USER=root
|
||||
|
||||
# ============ PRINT MESSAGE ===========================
|
||||
lc1='\e[01;31m' # light red
|
||||
dc1='\e[00;31m' # dark red
|
||||
lc2='\e[01;37m' # white
|
||||
dc2='\e[00;37m' # gray
|
||||
|
||||
# fix broken console with utf8 in the alternative-kernels
|
||||
echo -n -e '\033%G'
|
||||
kbd_mode -u
|
||||
|
||||
LINES=$(stty size|cut -d" " -f1)
|
||||
fbecho()
|
||||
{
|
||||
[ $LINES -ge 28 ] && echo
|
||||
}
|
||||
|
||||
if [ -f /root/version ]
|
||||
then
|
||||
VERSION=" ${lc2}$(cat /root/version)${lc1} "
|
||||
else
|
||||
VERSION=""
|
||||
fi
|
||||
|
||||
if [ -f /root/rb_version ]
|
||||
then
|
||||
RB_VERSION=" ${lc2}$(cat /root/rb_version)${lc1} "
|
||||
else
|
||||
RB_VERSION=""
|
||||
fi
|
||||
|
||||
|
||||
fbecho
|
||||
echo -e "${lc1} ======== ${lc2}RescueBRU${lc1} -${RB_VERSION}=== ${lc2}SystemRescueCD${lc1} -${VERSION}=== ${lc2}$(basename $(tty))${dc2}/6 ${lc1}========"
|
||||
echo -e " ${dc1}http://www.sysresccd.org/"
|
||||
echo
|
||||
echo -e "${dc1}*${dc2} Type ${lc2}rescuebru${dc2} to run the backup/restore utility."
|
||||
echo -e "${dc1}*${dc2} Type ${lc2}rbruserver${dc2} to start the backup server."
|
||||
echo
|
||||
echo -e "${dc1}*${dc2} Type ${lc2}srcdtips${dc2} to view SystemRescueCD tips."
|
||||
fbecho
|
||||
|
||||
# ============ SHELL PROMPT ============================
|
||||
exec $SHELL --login
|
||||
|
||||
Reference in New Issue
Block a user