Print a message before we drop to a shell

This may be used by another script to determine where we managed to
boot.
This commit is contained in:
Rodrigo Arias 2024-10-11 11:06:36 +02:00
parent ad5dd72928
commit 8d1bb60476

View File

@ -1,8 +1,6 @@
#! @shell@
set -x
echo "--- starting stage 2 ---"
#set -x
systemConfig=@systemConfig@
@ -10,6 +8,11 @@ export HOME=/root PATH="@path@"
if [ "${IN_NIXOS_SYSTEMD_STAGE1:-}" != true ]; then
# Print a greeting.
echo
echo -e "\e[1;32m<<< @distroName@ Stage 2 >>>\e[0m"
echo
# Process the kernel command line.
for o in $(</proc/cmdline); do
case $o in
@ -28,13 +31,6 @@ if [ "${IN_NIXOS_SYSTEMD_STAGE1:-}" != true ]; then
esac
done
# Print a greeting.
echo
echo -e "\e[1;32m<<< @distroName@ Stage 2 >>>\e[0m"
echo
# Normally, stage 1 mounts the root filesystem read/writable.
# However, in some environments, stage 2 is executed directly, and the
# root is read-only. So make it writable here.