Changeset 3213 in MondoRescue
- Timestamp:
- Dec 23, 2013, 9:19:40 PM (11 years ago)
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mindi/get-modules.pl
r900 r3213 3 3 use strict; 4 4 use POSIX "uname"; 5 use Data::Dumper; 5 6 6 my ($sysname, $nodename, $release, $version, $machine ) = uname ;7 my ($sysname, $nodename, $release, $version, $machine ) = uname(); 7 8 my $ver = ""; 8 9 my $module = ""; … … 22 23 while (<DEPMOD>) { 23 24 ($module, $modlist{$module}) = split(/:/); 25 chomp($modlist{$module}); 24 26 last if ($module =~ /^#/); 25 27 #print "Analyzing $module\n"; 26 28 } 29 print Dumper(%modlist)."\n"; 27 30 while (<LSMOD>) { 28 31 next if (/^Module/); … … 31 34 $module = `/sbin/modinfo -n $module`; 32 35 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}; 34 39 } 35 40 close(LSMOD); … … 37 42 $allmodules =~ s/\n/ /g; 38 43 $allmodules =~ s/ */ /g; 39 print "$allmodules\n"; 44 $allmodules =~ s/ [0-9A-z\/]*\// /g; 45 $allmodules =~ s/\.ko.xz//g; 46 print "all modules: $allmodules\n";
Note:
See TracChangeset
for help on using the changeset viewer.