diff options
| author | David Leadbeater | 2015-01-10 18:02:02 +0000 |
|---|---|---|
| committer | David Leadbeater | 2015-01-10 18:02:02 +0000 |
| commit | 5ed28b18d271d7fb4706fc85c4ca38f27d96353a (patch) | |
| tree | 8f7c9b541167ff5fc5c575da6a686e4c193d1662 /scripts | |
| parent | 3350aef6b04f0d33ad52b41179c6742a98d2aa1f (diff) | |
| download | scripts.irssi.org-5ed28b18d271d7fb4706fc85c4ca38f27d96353a.tar.bz2 | |
Fix PCI info for kernels without /proc, detect wireless cards too
Thanks Nei for spotting.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/sysinfo_dg.pl | 6 |
1 files changed, 3 insertions, 3 deletions
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(<PCI>){ chomp; if(/VGA compatible controller: (.*?)$/){ $videocard .= "${1}+ "; - }elsif(/Ethernet controller: (.*?)$/){ + }elsif(/(Ethernet|Network) controller: (.*?)$/){ $ethernet = $1; } } |
