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 | |
| 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.
| -rw-r--r-- | _data/scripts.yaml | 4 | ||||
| -rw-r--r-- | scripts/sysinfo_dg.pl | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/_data/scripts.yaml b/_data/scripts.yaml index 06e9019..67d3c74 100644 --- a/_data/scripts.yaml +++ b/_data/scripts.yaml @@ -3658,11 +3658,11 @@ contact: "dgl@dgl.cx" description: "Adds a /sysinfo command which prints system information (linux only)." filename: "sysinfo_dg.pl" - modified: "2008-05-17 17:39:11" + modified: "2014-01-1 18:01:22" license: "GNU GPLv2 or later" name: "sysinfo-dg" url: "http://irssi.dgl.cx/" - version: "1.2" + version: "1.3" - authors: "Juerd, Tronic" contact: "trn@iki.fi" 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; } } |
