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() {
|
post_to_api() {
|
||||||
|
|
||||||
echo "post_to_api"
|
|
||||||
|
|
||||||
if ! command -v curl &>/dev/null; then
|
if ! command -v curl &>/dev/null; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -2585,7 +2585,7 @@ EOF
|
|||||||
for dev in "${devices[@]}"; do
|
for dev in "${devices[@]}"; do
|
||||||
# Add to config using pct set (will be visible in GUI)
|
# Add to config using pct set (will be visible in GUI)
|
||||||
echo "dev${dev_index}: ${dev},gid=44" >>"$LXC_CONFIG"
|
echo "dev${dev_index}: ${dev},gid=44" >>"$LXC_CONFIG"
|
||||||
((dev_index++))
|
dev_index=$((dev_index + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
export GPU_TYPE="$selected_gpu"
|
export GPU_TYPE="$selected_gpu"
|
||||||
@ -2602,7 +2602,7 @@ EOF
|
|||||||
local dev_index=0
|
local dev_index=0
|
||||||
for dev in "${NVIDIA_DEVICES[@]}"; do
|
for dev in "${NVIDIA_DEVICES[@]}"; do
|
||||||
echo "dev${dev_index}: ${dev},gid=44" >>"$LXC_CONFIG"
|
echo "dev${dev_index}: ${dev},gid=44" >>"$LXC_CONFIG"
|
||||||
((dev_index++))
|
dev_index=$((dev_index + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
export GPU_TYPE="NVIDIA"
|
export GPU_TYPE="NVIDIA"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user