mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-28 20:26:53 +00:00
update disk-passthrough.sh
This commit is contained in:
parent
2e10aebb78
commit
15ecacd251
@ -174,7 +174,7 @@ while read -r DISK; do
|
|||||||
|
|
||||||
USED_BY=""
|
USED_BY=""
|
||||||
REAL_PATH=$(readlink -f "$DISK")
|
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
|
if grep -Fq "$REAL_PATH" <<< "$CONFIG_DATA"; then
|
||||||
USED_BY="⚠ $(translate "In use")"
|
USED_BY="⚠ $(translate "In use")"
|
||||||
|
@ -220,7 +220,8 @@ while read -r DISK; do
|
|||||||
|
|
||||||
USED_BY=""
|
USED_BY=""
|
||||||
REAL_PATH=$(readlink -f "$DISK")
|
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
|
if grep -Fq "$REAL_PATH" <<< "$CONFIG_DATA"; then
|
||||||
USED_BY="⚠ $(translate "In use")"
|
USED_BY="⚠ $(translate "In use")"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user