summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2019-02-25 13:47:03 +1100
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2019-03-06 09:51:12 +1300
commit5c726bd40a4a745e115a22e336131be8f6666b55 (patch)
tree9dcee5b8d0c513bfa36a6b6ec5b41273908e6648
parent3abf853d2cc6f5ef137eedae64779790e3b472b7 (diff)
downloadtalos-petitboot-5c726bd40a4a745e115a22e336131be8f6666b55.zip
talos-petitboot-5c726bd40a4a745e115a22e336131be8f6666b55.tar.gz
utils/pb-console: Trap SIGTERM on bootv1.10.2
On kexec all processes will be sent a SIGTERM and SIGKILL. By default there are messages on the console alerting the user to this, however in some implementations these messages are disabled. This can have the effect of the UI seemingly exiting to the shell on boot and hanging for a short while before the kexec actually jumps into the next kernel. Trap the SIGTERM sent to the pb-console parent process and print a short message to the screen instead of momentarily dropping to the shell and printing the usual help messages. While here also cleanup the shell help messages below which are now handled in the shell's .shrc file. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
-rw-r--r--utils/pb-console3
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/pb-console b/utils/pb-console
index ad601e2..5ba98cc 100644
--- a/utils/pb-console
+++ b/utils/pb-console
@@ -135,12 +135,11 @@ fi
dmesg -n 1
trap '' SIGINT
+trap 'reset; echo "SIGTERM received, booting..."; sleep 2' SIGTERM
while :
do
$ui $verbose_opt
reset
- echo "Exiting petitboot. Type 'exit' to return."
- echo "You may run 'pb-sos' to gather diagnostic data"
$shell
done
OpenPOWER on IntegriCloud