From f50bb9cc46ac2c6f98f7c78ab1bdefefcb01ad29 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Sun, 10 Nov 2024 00:16:03 +0100 Subject: [PATCH] arc-functions: fix logic Signed-off-by: AuxXxilium --- files/initrd/opt/arc/arc-functions.sh | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/files/initrd/opt/arc/arc-functions.sh b/files/initrd/opt/arc/arc-functions.sh index c7507a0b..d2e4a3b1 100755 --- a/files/initrd/opt/arc/arc-functions.sh +++ b/files/initrd/opt/arc/arc-functions.sh @@ -970,11 +970,6 @@ function sysinfo() { TEXT+="\n CPU: \Zb${CPU}\Zn" if [ $(lspci -d ::300 | wc -l) -gt 0 ]; then for PCI in $(lspci -d ::300 | awk '{print $1}'); do - GPUNAME=$(lspci -s ${PCI} | sed "s/\ .*://" | awk '{$1=""}1' | awk '{$1=$1};1') - TEXT+="\n iGPU: \Zb${GPUNAME}\Zn" - done - elif [ $(lspci -d ::380 | wc -l) -gt 0 ]; then - for PCI in $(lspci -d ::380 | awk '{print $1}'); do GPUNAME=$(lspci -s ${PCI} | sed "s/\ .*://" | awk '{$1=""}1' | awk '{$1=$1};1') TEXT+="\n GPU: \Zb${GPUNAME}\Zn" done @@ -1097,7 +1092,7 @@ function sysinfo() { TEXT+="\Zb ${NAME}\Zn\n Disks: ${PORTNUM}\n" NUMPORTS=$((${NUMPORTS} + ${PORTNUM})) done - [ $(lspci -d ::107 2>/dev/null | wc -l) -gt 0 ] && TEXT+="\nHBA Controller:\n" + [ $(lspci -d ::107 2>/dev/null | wc -l) -gt 0 ] && TEXT+="\n HBA Controller:\n" for PCI in $(lspci -d ::107 2>/dev/null | awk '{print $1}'); do NAME=$(lspci -s "${PCI}" 2>/dev/null | sed "s/\ .*://") PORT=$(ls -l /sys/class/scsi_host 2>/dev/null | grep "${PCI}" | awk -F'/' '{print $NF}' | sed 's/host//' | sort -n) @@ -1113,14 +1108,6 @@ function sysinfo() { TEXT+="\Zb ${NAME}\Zn\n Disks: ${PORTNUM}\n" NUMPORTS=$((${NUMPORTS} + ${PORTNUM})) done - [ $(lspci -d ::101 2>/dev/null | wc -l) -gt 0 ] && TEXT+="\n IDE Controller:\n" - for PCI in $(lspci -d ::101 2>/dev/null | awk '{print $1}'); do - NAME=$(lspci -s "${PCI}" 2>/dev/null | sed "s/\ .*://") - PORTNUM=$(ls -l /sys/block/* 2>/dev/null | grep "${PCI}" | wc -l) - [ ${PORTNUM} -eq 0 ] && continue - TEXT+="\Zb ${NAME}\Zn\n Disks: ${PORTNUM}\n" - NUMPORTS=$((${NUMPORTS} + ${PORTNUM})) - done [ $(ls -l /sys/class/scsi_host 2>/dev/null | grep usb | wc -l) -gt 0 ] && TEXT+="\n USB Controller:\n" for PCI in $(lspci -d ::c03 2>/dev/null | awk '{print $1}'); do NAME=$(lspci -s "${PCI}" 2>/dev/null | sed "s/\ .*://")