From 7504fd6be397ac154ecd61ffab7b9fbafddc4a0c Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Fri, 29 Jan 2010 19:56:50 +0100 Subject: Nicer shell prompt in the break/emergency shell --- init | 4 ++-- init_functions | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/init b/init index 4904d12..6064f14 100644 --- a/init +++ b/init @@ -93,7 +93,7 @@ fi if [ "${break}" = "y" ]; then echo ":: Break requested, type 'exit' to resume operation" - PS1="ramfs$ " /bin/sh -i + launch_interactive_shell fi if [ -f "/message" ]; then @@ -145,7 +145,7 @@ if [ -z "${nfsroot}" -a "${root}" != "/dev/nfs" ]; then echo "You are being dropped to a recovery shell" echo " Type 'reboot' to reboot" echo " Type 'exit' to try and continue booting" - PS1="ramfs$ " /bin/sh -i + launch_interactive_shell msg "Trying to continue (this will most likely fail) ..." fi fi diff --git a/init_functions b/init_functions index 968258a..2692a2a 100644 --- a/init_functions +++ b/init_functions @@ -21,3 +21,7 @@ poll_device() { done [ -b "${device}" -o -h "${device}" ] } + +launch_interactive_shell() { + PS1='[ramfs \W]\$ ' /bin/sh -i +} -- cgit v1.2.3-24-g4f1b