Changeset 3213 for trunk


Ignore:
Timestamp:
Dec 23, 2013, 9:19:40 PM (4 years ago)
Author:
bruno
Message:
  • Add a get-modules.pl script to mindi (TBD further)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mindi/get-modules.pl

    r900 r3213  
    33use strict;
    44use POSIX "uname";
     5use Data::Dumper;
    56
    6 my ($sysname, $nodename, $release, $version, $machine ) = uname;
     7my ($sysname, $nodename, $release, $version, $machine ) = uname();
    78my $ver = "";
    89my $module = "";
     
    2223while (<DEPMOD>) {
    2324    ($module, $modlist{$module}) = split(/:/);
     25    chomp($modlist{$module});
    2426    last if ($module =~ /^#/);
    2527    #print "Analyzing $module\n";
    2628}
     29print Dumper(%modlist)."\n";
    2730while (<LSMOD>) {
    2831    next if (/^Module/);
     
    3134    $module = `/sbin/modinfo -n $module`;
    3235    chomp($module);
    33     $allmodules .= $modlist{$module};
     36    my ($void,$lib,$modulep,$kernelv,$modpath) = split(/\//,$module,5);
     37    print "modpath: $modpath\n";
     38    $allmodules .= $modlist{$modpath};
    3439}
    3540close(LSMOD);
     
    3742$allmodules =~ s/\n/ /g;
    3843$allmodules =~ s/  */ /g;
    39 print "$allmodules\n";
     44$allmodules =~ s/ [0-9A-z\/]*\// /g;
     45$allmodules =~ s/\.ko.xz//g;
     46print "all modules: $allmodules\n";
Note: See TracChangeset for help on using the changeset viewer.