From 8f5000180a4684184d4acf0dc299c25c8a1607d6 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sat, 11 Feb 2023 18:01:28 +0100 Subject: [PATCH] add text for emergency shell --- usr/share/archboot/base/init | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/usr/share/archboot/base/init b/usr/share/archboot/base/init index 6de4036d5..d9edfe523 100755 --- a/usr/share/archboot/base/init +++ b/usr/share/archboot/base/init @@ -4,8 +4,7 @@ _emergency_shell() { echo "Welcome to Archboot Emergeny Shell:" echo "Seems something went wrong..." - echo "Reboot will happen in 10 seconds. Hit CTRL-C to enter shell." - reboot + echo "Type 'poweroff' for shutdown or 'reboot' to restart." } # mount kernel filesystems @@ -54,13 +53,13 @@ if ! [[ -f "/mnt/boot/initramfs-$(uname -m).img" ]] ; then echo "ERROR: Didn't find a device with archboot rootfs!" echo "This needs further debugging. Please contact the archboot author." echo "Tobias Powalowski: tpowa@archlinux.org" - /bin/sh + _emergency_shell fi fi -cd /new_root || /bin/sh +cd /new_root || _emergency_shell echo -e "\e[1mStep 4/4:\e[m Copying archboot rootfs to /new_root..." echo -e " This may need some time..." -bsdcpio -i <"/mnt/boot/initramfs-$(uname -m).img" &>/dev/null || /bin/sh +bsdcpio -i <"/mnt/boot/initramfs-$(uname -m).img" &>/dev/null || _emergency_shell exec switch_root /new_root /init "$@" # vim: set ft=sh ts=4 sw=4 et: