From 5ed28b18d271d7fb4706fc85c4ca38f27d96353a Mon Sep 17 00:00:00 2001 From: David Leadbeater Date: Sat, 10 Jan 2015 18:02:02 +0000 Subject: Fix PCI info for kernels without /proc, detect wireless cards too Thanks Nei for spotting. --- scripts/sysinfo_dg.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/sysinfo_dg.pl b/scripts/sysinfo_dg.pl index 208e4aa..360a916 100644 --- a/scripts/sysinfo_dg.pl +++ b/scripts/sysinfo_dg.pl @@ -2,7 +2,7 @@ use strict; use Irssi 20011210.0250 (); use vars qw($VERSION %IRSSI); -$VERSION = "1.2"; +$VERSION = "1.3"; %IRSSI = ( authors => 'David Leadbeater', contact => 'dgl@dgl.cx', @@ -294,12 +294,12 @@ sub cpuinfo{ sub pciinfo{ my($videocard,$ethernet); - open(PCI, "<", "/proc/pci") or return undef; + open(PCI, "-|", "/sbin/lspci") or return undef; while(){ chomp; if(/VGA compatible controller: (.*?)$/){ $videocard .= "${1}+ "; - }elsif(/Ethernet controller: (.*?)$/){ + }elsif(/(Ethernet|Network) controller: (.*?)$/){ $ethernet = $1; } } -- cgit v1.2.3