From bbfd3b1ebb7b8c2f2188a6482f54e1481987969b Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 2 Aug 2024 15:32:07 +0200 Subject: [PATCH] Redirect stderr of lspci invocations to separate files Otherwise executing lspci might spill something like: # lspci -vvnn > /dev/null pcilib: sysfs_read_vpd: read failed: No such device Which according to https://bugzilla.kernel.org/show_bug.cgi?id=199467 isn't an "actual" error, but there is just no VPD EEPROM present. But as long as it shows up on stderr, it behaves like an error, so let's also tread it like an error. :) Related to grml/grml-hwinfo#12 Thanks: Darshaka Pathirana for the bug report --- grml-hwinfo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grml-hwinfo b/grml-hwinfo index f5f398a..f3b651e 100755 --- a/grml-hwinfo +++ b/grml-hwinfo @@ -261,8 +261,8 @@ cd "${OUTDIR}" || exit 1 # disks / devices [ -f /proc/scsi/scsi ] && cat /proc/scsi/scsi > scsi - exectest lspci && lspci -nn > ./lspci - exectest lspci && lspci -vvnn > ./lspci_verbose + exectest lspci && lspci -nn >./lspci 2>./lspci.error + exectest lspci && lspci -vvnn >./lspci_verbose 2>./lspci_verbose.error cat /proc/partitions > partitions find /proc/ide/ -name geometry -exec grep . {} \; > proc_ide 2>/dev/null df -h > ./df 2>/dev/null