Added more message files. Updated the initramfs scripts to use the new message files.

This commit is contained in:
Ivan Davidov 2016-05-20 22:04:02 +03:00
parent ad683263a6
commit 9f7dd0cf57
8 changed files with 37 additions and 83 deletions

View File

@ -37,20 +37,8 @@
# #
# exec /sbin/init # exec /sbin/init
# Set white color. # Print first message on screen.
echo -en "\\e[1m" cat /etc/msg/03_init_01.txt
# Print message on screen.
cat << CEOF
Press empty key (TAB, SPACE, ENTER) or wait 5 seconds to continue with the
system initialization process. Press any other key for PID 1 rescue shell
outside of the initramfs area.
CEOF
# Unset all attributes.
echo -en "\\e[0m"
# Wait 5 second or until any keybord key is pressed. # Wait 5 second or until any keybord key is pressed.
read -t 5 -n1 -s key read -t 5 -n1 -s key
@ -60,24 +48,8 @@ if [ "$key" = "" ] ; then
echo "Executing /sbin/init as PID 1." echo "Executing /sbin/init as PID 1."
exec /sbin/init exec /sbin/init
else else
# Set white color. # Print second message on screen.
echo -en "\\e[1m" cat /etc/msg/03_init_02.txt
# Print message on screen.
cat << CEOF
This is PID 1 rescue shell outside of the initramfs area. Execute the
following in order to continue with the system initialization:
CEOF
# Set green color.
echo -en "\\e[32m"
cat << CEOF
exec /sbin/init
CEOF
# Unset all attributes.
echo -en "\\e[0m"
if [ "$PID1_SHELL" = "true" ] ; then if [ "$PID1_SHELL" = "true" ] ; then
# PID1_SHELL flag is set which means we have controlling terminal. # PID1_SHELL flag is set which means we have controlling terminal.

View File

@ -7,12 +7,12 @@
::shutdown:echo -e "\n \\e[1mSee you soon!\\e[0m\n" ::shutdown:echo -e "\n \\e[1mSee you soon!\\e[0m\n"
::shutdown:sleep 1 ::shutdown:sleep 1
::ctrlaltdel:/sbin/reboot ::ctrlaltdel:/sbin/reboot
::once:cat /etc/welcome.txt ::once:cat /etc/msg/welcome.txt
::respawn:/bin/cttyhack /bin/sh ::respawn:/bin/cttyhack /bin/sh
tty2::once:cat /etc/welcome.txt tty2::once:cat /etc/msg/welcome.txt
tty2::respawn:/bin/sh tty2::respawn:/bin/sh
tty3::once:cat /etc/welcome.txt tty3::once:cat /etc/msg/welcome.txt
tty3::respawn:/bin/sh tty3::respawn:/bin/sh
tty4::once:cat /etc/welcome.txt tty4::once:cat /etc/msg/welcome.txt
tty4::respawn:/bin/sh tty4::respawn:/bin/sh

View File

@ -0,0 +1,5 @@

Press empty key (TAB, SPACE, ENTER) or wait 5 seconds to continue with the
system initialization process. Press any other key for PID 1 rescue shell
outside of the initramfs area.


View File

@ -0,0 +1,5 @@
 This is PID 1 rescue shell outside of the initramfs area. Execute the
following in order to continue with the system initialization:

exec /sbin/init


View File

@ -0,0 +1,5 @@

Press empty key (TAB, SPACE, ENTER) or wait 5 seconds to continue with the
overlay initialization process. Press any other key for PID 1 rescue shell
inside the initramfs area.


View File

@ -0,0 +1,10 @@
 This is PID 1 rescue shell inside the initramfs area. Execute the following in
order to continue with the overlay initialization process:

exec /etc/02_overlay.sh

Execute the following in order to skip the overlay initialization and continue
directly with the system initialization:

exec /sbin/init


View File

@ -31,58 +31,15 @@ echo -e "Welcome to \\e[1mMinimal \\e[32mLinux \\e[31mLive\\e[0m (/init)"
# Let's mount all core file systems. # Let's mount all core file systems.
/etc/01_prepare.sh /etc/01_prepare.sh
# Set white color. # Print first message on screen.
echo -en "\\e[1m" cat /etc/msg/init_01.txt
# Print message on screen.
cat << CEOF
Press empty key (TAB, SPACE, ENTER) or wait 5 seconds to continue with the
overlay initialization process. Press any other key for PID 1 rescue shell
inside the initramfs area.
CEOF
# Unset all attributes.
echo -en "\\e[0m"
# Wait 5 second or until any keybord key is pressed. # Wait 5 second or until any keybord key is pressed.
read -t 5 -n1 -s key read -t 5 -n1 -s key
if [ ! "$key" = "" ] ; then if [ ! "$key" = "" ] ; then
# Set white color. # Print second message on screen.
echo -en "\\e[1m" cat /etc/msg/init_02.txt
# Print message on screen.
cat << CEOF
This is PID 1 rescue shell inside the initramfs area. Execute the following in
order to continue with the overlay initialization process:
CEOF
# Set green color.
echo -en "\\e[32m"
cat << CEOF
exec /etc/02_overlay.sh
CEOF
# Set white color.
echo -en "\\e[0m\\e[1m"
cat << CEOF
Execute the following in order to skip the overlay initialization and continue
directly with the system initialization:
CEOF
# Set green color.
echo -en "\\e[32m"
cat << CEOF
exec /sbin/init
CEOF
# Unset all attributes.
echo -en "\\e[0m"
# Set flag which indicates that we have obtained controlling terminal. # Set flag which indicates that we have obtained controlling terminal.
export PID1_SHELL=true export PID1_SHELL=true