From 181050ea43abb3613c615b6baad613c5e5ab8fb0 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Mon, 14 Sep 2026 20:12:31 -0300 Subject: [PATCH] fix(xcat-core): a diskfull install runs a post script bash cannot parse Every diskfull install stopped in the installer. The node installed the OS and answered ping, but no postscript ran, so remoteshell never wrote the root key and the management node got "Permission denied (publickey,password)". The node stayed at status powering-on and reinstalled in a loop. append_xcatpost_cleanup in xCAT/postscripts/xcatdsklspost writes the cleanup with a here-document whose delimiter is EOF, so the file holds a line "EOF". post.xcat, post.xcat.ng, post.xcat.rhels10, post.debian and the two s390x scripts embed the whole file with "#INCLUDE:#" inside "cat >/opt/xcat/xcatdsklspost << 'EOF'". That line ends the outer here-document early, and the remaining 890 lines of xcatdsklspost become shell code in the generated install script. bash reports a syntax error and curtin fails the late-command that runs it. The here-document now ends at XCATPOST_CLEANUP, and a comment states the constraint the file is under. postscript_heredoc_embedding.t assembles each embedding and parses it. It fails on the six install scripts without this change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> (cherry picked from commit b2d19b4afe187b7998cee1488899fd6f975b3e44) --- xCAT/postscripts/xcatdsklspost | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index f8272561d..c725a80b0 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -255,14 +255,17 @@ append_xcatpost_cleanup() cleanupdiskfullxcatpost=`grep CLEANUPDISKFULLXCATPOST= "$mypostscript" |awk -F = '{print $2}' | tr -d \'\" | tr A-Z a-z` if [[ "$cleanupdiskfullxcatpost" =~ ^(1|yes|y)$ ]]; then - cat >> "$mypostscript" <> "$mypostscript" <