Fix: remove debug echo from post_to_api, fix dev_index arithmetic in GPU passthrough (set -e compatible)
This commit is contained in:
parent
68aa1df1b6
commit
d08d3ec424
@ -151,8 +151,6 @@ explain_exit_code() {
|
||||
# ------------------------------------------------------------------------------
|
||||
post_to_api() {
|
||||
|
||||
echo "post_to_api"
|
||||
|
||||
if ! command -v curl &>/dev/null; then
|
||||
return
|
||||
fi
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user