From 3461a54bc39ebecea1aa9912135d751f7a3a828a Mon Sep 17 00:00:00 2001 From: teldra Date: Mon, 12 Sep 2022 11:11:20 +0200 Subject: [PATCH] test --- main.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.sh b/main.sh index 05b6c0f..e8aa827 100755 --- a/main.sh +++ b/main.sh @@ -41,7 +41,7 @@ target_phy_disk() { target_phy_id() { local i local f2 - if echo "${TARGET_PHY_DISK}" | grep -qv vd ; then + if ! echo "${TARGET_PHY_DISK}" | grep -q vd ; then for i in $(find /dev/disk/by-id ! -type d | grep -v part); do if realpath "${i}" | grep -q -i "${TARGET_PHY_DISK}"; then if echo "${i}" | grep -v "wwn" | grep -q -v "eui"; then @@ -52,6 +52,7 @@ target_phy_id() { done else TARGET_PHY_ID="/dev/${TARGET_PHY_DISK}" + f2="1" fi if [ "$f2" == "1" ]; then return 0