update disk-passthrough.sh

This commit is contained in:
MacRimi 2025-04-08 20:33:51 +02:00
parent 2e10aebb78
commit 15ecacd251
2 changed files with 3 additions and 2 deletions

View File

@ -174,7 +174,7 @@ while read -r DISK; do
USED_BY=""
REAL_PATH=$(readlink -f "$DISK")
CONFIG_DATA=$(cat /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
USED_BY="$(translate "In use")"

View File

@ -220,7 +220,8 @@ while read -r DISK; do
USED_BY=""
REAL_PATH=$(readlink -f "$DISK")
CONFIG_DATA=$(cat /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
USED_BY="$(translate "In use")"