Update disk-passthrough_ct.sh

This commit is contained in:
MacRimi 2025-04-08 21:34:44 +02:00
parent 7c839da452
commit 403f8befec

View File

@ -222,7 +222,6 @@ while read -r DISK; do
REAL_PATH=$(readlink -f "$DISK") REAL_PATH=$(readlink -f "$DISK")
CONFIG_DATA=$(grep -vE '^\s*#' /etc/pve/qemu-server/*.conf /etc/pve/lxc/*.conf 2>/dev/null) CONFIG_DATA=$(grep -vE '^\s*#' /etc/pve/qemu-server/*.conf /etc/pve/lxc/*.conf 2>/dev/null)
if grep -Fq "$REAL_PATH" <<< "$CONFIG_DATA"; then if grep -Fq "$REAL_PATH" <<< "$CONFIG_DATA"; then
USED_BY="$(translate "In use")" USED_BY="$(translate "In use")"
else else
@ -252,7 +251,7 @@ while read -r DISK; do
SHOW_DISK=false SHOW_DISK=false
fi fi
if pct config "$CTID" | grep -q "$DISK"; then if pct config "$CTID" | grep -vE '^\s*#|^description:' | grep -q "$DISK"; then
SHOW_DISK=false SHOW_DISK=false
fi fi