From 182ba3a931793e7e73b19b1584042a4b710af55f Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 3 Mar 2023 11:30:59 +0100 Subject: [PATCH] run/load/ipxe: prevent error on kill_spawned ... if the run script exits early. --- tool/run/load/ipxe | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tool/run/load/ipxe b/tool/run/load/ipxe index 4cf895320e..4c88390f10 100644 --- a/tool/run/load/ipxe +++ b/tool/run/load/ipxe @@ -106,7 +106,8 @@ rename exit load_ipxe_real_exit proc exit {{status 0}} { if {[load_ipxe_lighttpd]} { global lighttpd_spawn_id - kill_spawned $lighttpd_spawn_id + # variable may not exist if the script fails early + if {[info exists lighttpd_spawn_id]} { kill_spawned $lighttpd_spawn_id } } load_ipxe_real_exit $status