* [pve-devel] [PATCH installer] unconfigured: also catch ^C signal with debug shell
@ 2025-12-19 18:54 Christoph Heiss
0 siblings, 0 replies; only message in thread
From: Christoph Heiss @ 2025-12-19 18:54 UTC (permalink / raw)
To: pve-devel
Currently, pressing Ctrl-C during the installation - mostly relevant
when running the auto-installer - will cause a kernel panic, as
unconfigured.sh is running as PID 1.
Instead, drop the user into our debug shell, which is a bit better UX
and more useful, too.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
unconfigured.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/unconfigured.sh b/unconfigured.sh
index caa08c3..40e17b0 100755
--- a/unconfigured.sh
+++ b/unconfigured.sh
@@ -3,6 +3,7 @@
reboot_action="reboot"
trap "err_reboot" ERR
+trap "err_reboot" INT
# NOTE: we nowadays get exec'd by the initrd's PID 1, so we're the new PID 1
@@ -75,6 +76,9 @@ eject_and_reboot() {
real_reboot() {
trap - ERR
+ # ignore ^C from this point, we are already shutting down
+ trap '' INT
+
if [[ -x /etc/init.d/networking ]]; then
/etc/init.d/networking stop
fi
--
2.51.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-12-19 18:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-19 18:54 [pve-devel] [PATCH installer] unconfigured: also catch ^C signal with debug shell Christoph Heiss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox