From 89a3275dbe96f4363b4cb84baeaa0a11e2480577 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 31 Aug 2020 15:00:54 +0200 Subject: emergency_shell patch to notify user in non-debug --- patches/dracut/dracut-lib.sh.patch | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 patches/dracut/dracut-lib.sh.patch diff --git a/patches/dracut/dracut-lib.sh.patch b/patches/dracut/dracut-lib.sh.patch new file mode 100644 index 00000000..25aa93ef --- /dev/null +++ b/patches/dracut/dracut-lib.sh.patch @@ -0,0 +1,34 @@ +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 99cb9dbc..dac642b5 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -1134,10 +1134,14 @@ emergency_shell() + fi + shift 2 + fi +- +- echo ; echo +- warn "$*" ++ if getarg splash; then ++ echo -en '\033[2J' > /dev/tty1 ++ fi ++ { ++ # clear fbsplash ++ echo "$@" + echo ++ } > /dev/tty1 + + _emergency_action=$(getarg rd.emergency) + [ -z "$_emergency_action" ] \ +@@ -1150,6 +1154,11 @@ emergency_shell() + source_hook "$hook" + warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line." + [ -z "$_emergency_action" ] && _emergency_action=halt ++ { ++ echo "Fatal error - contact your bwLehrpool administrator." ++ echo "Press any key to ${_emergency_action}." ++ } > /dev/tty1 ++ read -s -n 1 bs < /dev/tty1 + fi + + case "$_emergency_action" in -- cgit v1.2.3-55-g7522