summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2010-01-29 19:56:50 +0100
committerThomas Bächler <thomas@archlinux.org>2010-01-29 19:56:50 +0100
commit7504fd6be397ac154ecd61ffab7b9fbafddc4a0c (patch)
tree5f4b1af0044001474456b2b15dca10702e907a6d
parent64f2af7521825e9171cc191c6136870cf8a81f54 (diff)
downloadmkinitcpio-7504fd6be397ac154ecd61ffab7b9fbafddc4a0c.tar.gz
mkinitcpio-7504fd6be397ac154ecd61ffab7b9fbafddc4a0c.tar.xz
Nicer shell prompt in the break/emergency shell
-rw-r--r--init4
-rw-r--r--init_functions4
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
+}