summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Debesse <dev@illwieckz.net>2016-04-09 00:49:17 +0200
committerThomas Debesse <dev@illwieckz.net>2016-04-09 00:51:38 +0200
commit7e19b3280fd4d7e4658ed1df295ed9dbfc88c9df (patch)
tree1ea4ddd63591b6afb72594bab0ba16764bcfd39e
parentbe5e4f367adc03b95004cc7f1f6852599ece8d84 (diff)
fix "which lspci" output
-rwxr-xr-xsysinfo.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysinfo.sh b/sysinfo.sh
index bdf0c19..2a0df4a 100755
--- a/sysinfo.sh
+++ b/sysinfo.sh
@@ -47,7 +47,7 @@ disk_free=`echo $sua | awk '{printf "%d",$4/1048576;}'`;
#---[ VGA ] ---------------------------
gpu=''
-if which lspci 2>/dev/null; then
+if which lspci >/dev/null 2>/dev/null; then
gpu_slot=`lspci -mm | grep 'VGA' | head -n 1 | cut -f1 -d' '`
gpu_vendor=`lspci -s "${gpu_slot}" -mm -v | grep '^Vendor' | sed -e 's/Vendor:\t//' | sed -e 's/.*[ ]\[//;s/\].*//' | sed -e 's/, Inc.//;s/ Corporation//;s/ Co.//;s/,Ltd.//'`
gpu_model=`lspci -s "${gpu_slot}" -mm -v | grep '^Device' | sed -e 's/Device:\t//' | sed -e 's/.*[ ]\[//;s/\].*//'`