systemrescue-zfs/airootfs/usr/bin/bashlogin
2019-02-02 11:22:52 +00:00

59 lines
1.6 KiB
Bash
Executable file

#!/bin/sh
cd /root
# Environment variables
export LANG=en_US.utf8
export HOME=/root
export SHELL=/bin/bash
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
export path="/sbin /bin /usr/sbin /usr/bin"
export USER=root
# Process setkmap option if it was passed on the boot command line
for curopt in $(cat /proc/cmdline)
do
case "${curopt}" in
setkmap\=*)
SETKMAP=$(echo "${curopt}" | cut -f2 -d=)
/sbin/loadkeys ${SETKMAP}
mkdir -p /etc/sysconfig
echo "XKEYBOARD=${SETKMAP}" > /etc/sysconfig/keyboard
;;
esac
done
# Colors
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
}
fbecho
echo -e "${lc1} =========== ${lc2}SystemRescue-Cd${lc1} ----- ${lc2}%ISO_VERSION%${lc1} =========== ${lc2}$(basename $(tty))${dc2}/6 ${lc1}=="
echo -e " ${dc1}http://www.system-rescue-cd.org/"
echo
echo -e "${dc1}*${lc1} Console environment${dc2} : "
echo -e " Run ${lc2}setkmap${dc2} to choose the keyboard layout"
echo
echo -e "${dc1}*${lc1} Graphical environment${dc2} : "
echo -e " Type ${lc2}startx${dc2} to run the graphical environment"
echo -e " X.Org comes with the XFCE environment and several graphical tools:"
echo -e " ${dc1}-${dc2} Partition manager:..${lc2}gparted${dc2}"
echo -e " ${dc1}-${dc2} Web browser:........${lc2}firefox${dc2}"
echo -e " ${dc1}-${dc2} Text editor:........${lc2}notepadqq${dc2}"
echo
fbecho
# ============ SHELL PROMPT ============================
exec $SHELL --login