mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-05 00:35:35 +00:00
print warning if required chip modules are not found
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2906 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -4814,7 +4814,23 @@ sub generate_modprobes
|
||||
} elsif ($chip->{driver} eq "use-isa-instead") {
|
||||
$modprobes .= "# no I2C driver for $chip->{detected}[0]{chipname} use ISA driver instead\n";
|
||||
} elsif ($chip->{driver} ne "not-a-sensor") {
|
||||
$modprobes .= "modprobe $chip->{driver}\n";
|
||||
open(local *INPUTFILE, "modprobe -l $chip->{driver} 2>/dev/null |");
|
||||
local $_;
|
||||
my $modulefound = 0;
|
||||
while (<INPUTFILE>) {
|
||||
if(m@/@) {
|
||||
$modulefound = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close INPUTFILE;
|
||||
#check return value from modprobe in case modprobe -l isn't supported
|
||||
if((($? >> 8) == 0) && ! $modulefound) {
|
||||
$modprobes .= "# Warning: the required module $chip->{driver} is not currently installed on your system.\n";
|
||||
$modprobes .= "# For status of 2.6 kernel ports see http://secure.netroedge.com/~lm78/supported.html\n";
|
||||
$modprobes .= "# If driver is built-in to the kernel, or unavailable, comment out the following line.\n";
|
||||
}
|
||||
$modprobes .= "modprobe $chip->{driver}\n";
|
||||
}
|
||||
|
||||
# Handle detects at addresses normally not probed
|
||||
|
Reference in New Issue
Block a user