public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer] unconfigured: also catch ^C signal with debug shell
Date: Fri, 19 Dec 2025 19:54:04 +0100	[thread overview]
Message-ID: <20251219185408.283433-1-c.heiss@proxmox.com> (raw)

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


                 reply	other threads:[~2025-12-19 18:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251219185408.283433-1-c.heiss@proxmox.com \
    --to=c.heiss@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal