2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-21 09:52:17 +00:00

fix(ospkgs): report a failed cuda package install

Both cuda install blocks read the package manager status after they had
restored and exported ARCH, so R was always 0 and a failed cuda install
left the node reporting success. The status is now read directly after
the install on the apt path and on the yum and dnf path.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
This commit is contained in:
Vinícius Ferrão
2026-09-09 20:10:23 -03:00
parent c7b442598e
commit efef7546dd
+2 -2
View File
@@ -871,10 +871,10 @@ elif ( pmatch "$OSVER" "ubuntu*" ); then
original_arch=$ARCH
unset ARCH
eval $command
R=$?
# re declare the ARCH env after installing cuda command done
ARCH=$original_arch
export ARCH
R=$?
if [ $R -ne 0 ]; then
RETURNVAL=$R
fi
@@ -997,10 +997,10 @@ else
original_arch=$ARCH
unset ARCH
result=`eval $cmd 2>&1`
R=$?
# re declare the ARCH env after installing cuda command done
ARCH=$original_arch
export ARCH
R=$?
if [ $R -ne 0 ]; then
RETURNVAL=$R
logger -t $log_label -p local4.info "ospkgs: $cmd\n $result"