Added more message files. Updated the initramfs scripts to use the new message files.
This commit is contained in:
parent
ad683263a6
commit
9f7dd0cf57
@ -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.
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
5
src/minimal_rootfs/etc/msg/03_init_01.txt
Normal file
5
src/minimal_rootfs/etc/msg/03_init_01.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[1m
|
||||||
|
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.
|
||||||
|
[0m
|
5
src/minimal_rootfs/etc/msg/03_init_02.txt
Normal file
5
src/minimal_rootfs/etc/msg/03_init_02.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[1m This is PID 1 rescue shell outside of the initramfs area. Execute the
|
||||||
|
following in order to continue with the system initialization:
|
||||||
|
[1m[32m
|
||||||
|
exec /sbin/init
|
||||||
|
[0m
|
5
src/minimal_rootfs/etc/msg/init_01.txt
Normal file
5
src/minimal_rootfs/etc/msg/init_01.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[1m
|
||||||
|
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.
|
||||||
|
[0m
|
10
src/minimal_rootfs/etc/msg/init_02.txt
Normal file
10
src/minimal_rootfs/etc/msg/init_02.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[1m This is PID 1 rescue shell inside the initramfs area. Execute the following in
|
||||||
|
order to continue with the overlay initialization process:
|
||||||
|
[1m[32m
|
||||||
|
exec /etc/02_overlay.sh
|
||||||
|
[0m[1m
|
||||||
|
Execute the following in order to skip the overlay initialization and continue
|
||||||
|
directly with the system initialization:
|
||||||
|
[1m[32m
|
||||||
|
exec /sbin/init
|
||||||
|
[0m
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user