Mageia Bugzilla – Attachment 6399 Details for
Bug 7311
lot of firmwares are missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
updated checker
check.pl (text/plain), 834 bytes, created by
Thierry Vignaud
on 2015-04-30 06:39:27 CEST
(
hide
)
Description:
updated checker
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2015-04-30 06:39:27 CEST
Size:
834 bytes
patch
obsolete
>#!/usr/bin/perl > >use lib qw(/usr/lib/libDrakX); >use MDK::Common; >use list_modules; >use run_program; >use strict; > ># from drakx/kernel/modules.pl >my $images_cat = 'fs/* disk/* bus/* network/* input/* various/*'; #- ie everything except multimedia > >my @modules = map { category2modules($_) } split(' ', $images_cat); > ># update cache if necessary: >my $cache = 'fw_cache.txt'; >my @stat = stat($cache); >if ($stat[9] < (time() - 86400)) { > system("urpmf ^/lib/firmware|sed -e 's!.*:/lib/firmware/!!'|sort -u>$cache"); >} > >my %firmwares = map { chomp_($_) => undef } cat_($cache); > >foreach my $mod (@modules) { > my @fw = map { /^firmware:\s*(.*)/ ? $1 : () } run_program::get_stdout('/sbin/modinfo', $mod); > next if !@fw; > my @missing_fw = grep { !exists $firmwares{$_} } @fw; > print ">> missing $_ firmware for $mod\n" foreach @missing_fw; >}
#!/usr/bin/perl use lib qw(/usr/lib/libDrakX); use MDK::Common; use list_modules; use run_program; use strict; # from drakx/kernel/modules.pl my $images_cat = 'fs/* disk/* bus/* network/* input/* various/*'; #- ie everything except multimedia my @modules = map { category2modules($_) } split(' ', $images_cat); # update cache if necessary: my $cache = 'fw_cache.txt'; my @stat = stat($cache); if ($stat[9] < (time() - 86400)) { system("urpmf ^/lib/firmware|sed -e 's!.*:/lib/firmware/!!'|sort -u>$cache"); } my %firmwares = map { chomp_($_) => undef } cat_($cache); foreach my $mod (@modules) { my @fw = map { /^firmware:\s*(.*)/ ? $1 : () } run_program::get_stdout('/sbin/modinfo', $mod); next if !@fw; my @missing_fw = grep { !exists $firmwares{$_} } @fw; print ">> missing $_ firmware for $mod\n" foreach @missing_fw; }
View Attachment As Raw
Actions:
View
Attachments on
bug 7311
:
2740
|
3661
| 6399 |
6400