]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Fix PCI info for kernels without /proc, detect wireless cards too
authorDavid Leadbeater <redacted>
Sat, 10 Jan 2015 18:02:02 +0000 (18:02 +0000)
committerDavid Leadbeater <redacted>
Sat, 10 Jan 2015 18:02:02 +0000 (18:02 +0000)
Thanks Nei for spotting.

_data/scripts.yaml
scripts/sysinfo_dg.pl

index 06e9019090a40b6d1a3f0a6924768a6e6b72e739..67d3c74b1ef3e1f531218356c3e3bc03e3362ee9 100644 (file)
   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"
index 208e4aae537383fc65e64c232f8ebfe3a9ae39b5..360a9165f14cd02dfaabafb20ffe5311e21fcdcd 100644 (file)
@@ -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;
       }
    }
git clone https://git.99rst.org/PROJECT