summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2020-08-31 15:00:54 +0200
committerJonathan Bauer2020-08-31 15:00:54 +0200
commit89a3275dbe96f4363b4cb84baeaa0a11e2480577 (patch)
treed28878d5e74d8ba899000d923e159ee913a005cc
parent[dnbd3-rootfs] always print revision (0 if not given) (diff)
downloadsystemd-init-89a3275dbe96f4363b4cb84baeaa0a11e2480577.tar.gz
systemd-init-89a3275dbe96f4363b4cb84baeaa0a11e2480577.tar.xz
systemd-init-89a3275dbe96f4363b4cb84baeaa0a11e2480577.zip
emergency_shell patch to notify user in non-debug
-rw-r--r--patches/dracut/dracut-lib.sh.patch34
1 files changed, 34 insertions, 0 deletions
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