From d08d3ec42492e2f279e51300d1fa733d87a06b9a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 17 Nov 2025 15:44:56 +0100 Subject: [PATCH] Fix: remove debug echo from post_to_api, fix dev_index arithmetic in GPU passthrough (set -e compatible) --- misc/api.func | 2 -- misc/build.func | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/misc/api.func b/misc/api.func index 057ed0339..cae06c153 100644 --- a/misc/api.func +++ b/misc/api.func @@ -151,8 +151,6 @@ explain_exit_code() { # ------------------------------------------------------------------------------ post_to_api() { - echo "post_to_api" - if ! command -v curl &>/dev/null; then return fi diff --git a/misc/build.func b/misc/build.func index aa6201fbd..2dd4d3790 100644 --- a/misc/build.func +++ b/misc/build.func @@ -2585,7 +2585,7 @@ EOF for dev in "${devices[@]}"; do # Add to config using pct set (will be visible in GUI) echo "dev${dev_index}: ${dev},gid=44" >>"$LXC_CONFIG" - ((dev_index++)) + dev_index=$((dev_index + 1)) done export GPU_TYPE="$selected_gpu" @@ -2602,7 +2602,7 @@ EOF local dev_index=0 for dev in "${NVIDIA_DEVICES[@]}"; do echo "dev${dev_index}: ${dev},gid=44" >>"$LXC_CONFIG" - ((dev_index++)) + dev_index=$((dev_index + 1)) done export GPU_TYPE="NVIDIA"