mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-23 23:49:52 +07:00
arc-functions: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
8de9970341
commit
f50bb9cc46
@ -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/\ .*://")
|
||||
|
Loading…
Reference in New Issue
Block a user