Re: [pve-devel] [PATCH installer] unconfigured: also catch ^C signal with debug shell

Christoph Heiss
2026-03-27T09:14:00Z

Ping, still applies.

On Fri Dec 19, 2025 at 7:54 PM CET, Christoph Heiss wrote:
> 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