mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-29 21:38:17 +00:00
Print warnings about missing modules on screen, rather than telling
the user to add them to the configuration files. When using the sysconfig integration mode, the warnings would never be seen. Also don't include missing modules in the configuration files, as they may cause the lm_sensors service to fail. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5590 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
parent
d93dcb468e
commit
b1df5b6536
1
CHANGES
1
CHANGES
@ -54,6 +54,7 @@ SVN-HEAD
|
|||||||
Add Winbond/Nuvoton W83667HG support
|
Add Winbond/Nuvoton W83667HG support
|
||||||
Add Intel Core I7 support
|
Add Intel Core I7 support
|
||||||
Generate new format for /etc/sysconfig/lm_sensors
|
Generate new format for /etc/sysconfig/lm_sensors
|
||||||
|
Print warnings about missing modules on screen
|
||||||
sensors-detect-stat.pl: Delete (functionality merged into sensors-detect)
|
sensors-detect-stat.pl: Delete (functionality merged into sensors-detect)
|
||||||
|
|
||||||
3.0.3 (2008-09-28)
|
3.0.3 (2008-09-28)
|
||||||
|
@ -5117,7 +5117,6 @@ sub generate_modprobes
|
|||||||
$bus_modules{"i2c-isa"}++;
|
$bus_modules{"i2c-isa"}++;
|
||||||
}
|
}
|
||||||
if ($ipmi) {
|
if ($ipmi) {
|
||||||
$modprobes .= "# You must also install and load the IPMI modules\n";
|
|
||||||
$modprobes .= "modprobe ipmi-si\n";
|
$modprobes .= "modprobe ipmi-si\n";
|
||||||
$bus_modules{"ipmi-si"}++;
|
$bus_modules{"ipmi-si"}++;
|
||||||
}
|
}
|
||||||
@ -5127,7 +5126,8 @@ sub generate_modprobes
|
|||||||
foreach $driver (keys %chips_detected) {
|
foreach $driver (keys %chips_detected) {
|
||||||
next if not @{$chips_detected{$driver}};
|
next if not @{$chips_detected{$driver}};
|
||||||
if ($driver eq "to-be-written") {
|
if ($driver eq "to-be-written") {
|
||||||
$modprobes .= "# no driver for ${$chips_detected{$driver}}[0]{chipname} yet\n";
|
print "Note: there is no driver for ${$chips_detected{$driver}}[0]{chipname} yet.\n".
|
||||||
|
"Check http://www.lm-sensors.org/wiki/Devices for updates.\n\n";
|
||||||
} else {
|
} else {
|
||||||
open(local *INPUTFILE, "modprobe -l $driver 2>/dev/null |");
|
open(local *INPUTFILE, "modprobe -l $driver 2>/dev/null |");
|
||||||
local $_;
|
local $_;
|
||||||
@ -5142,15 +5142,16 @@ sub generate_modprobes
|
|||||||
# Check return value from modprobe in case modprobe -l
|
# Check return value from modprobe in case modprobe -l
|
||||||
# isn't supported
|
# isn't supported
|
||||||
if ((($? >> 8) == 0) && ! $modulefound) {
|
if ((($? >> 8) == 0) && ! $modulefound) {
|
||||||
$modprobes .= "# Warning: the required module $driver is not currently installed\n".
|
print "Warning: the required module $driver is not currently installed\n".
|
||||||
"# on your system. For status of 2.6 kernel ports check\n".
|
"on your system. If it is built into the kernel then it's OK.\n".
|
||||||
"# http://www.lm-sensors.org/wiki/Devices. If driver is built\n".
|
"Otherwise, check http://www.lm-sensors.org/wiki/Devices for\n".
|
||||||
"# into the kernel, or unavailable, comment out the following line.\n";
|
"driver availability.\n\n";
|
||||||
}
|
} else {
|
||||||
$modprobes .= "modprobe $driver\n";
|
$modprobes .= "modprobe $driver\n";
|
||||||
$hwmon_modules{$driver}++;
|
$hwmon_modules{$driver}++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
my @bus_modules = sort keys %bus_modules;
|
my @bus_modules = sort keys %bus_modules;
|
||||||
my @hwmon_modules = sort keys %hwmon_modules;
|
my @hwmon_modules = sort keys %hwmon_modules;
|
||||||
@ -5408,7 +5409,12 @@ sub main
|
|||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
my ($modprobes, $configfile, $bus_modules, $hwmon_modules) = generate_modprobes();
|
my ($modprobes, $configfile, $bus_modules, $hwmon_modules) = generate_modprobes();
|
||||||
|
|
||||||
|
if (@{$hwmon_modules}) {
|
||||||
write_config($modprobes, $configfile, $bus_modules, $hwmon_modules);
|
write_config($modprobes, $configfile, $bus_modules, $hwmon_modules);
|
||||||
|
} else {
|
||||||
|
print "No modules to load, skipping modules configuration.\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
unload_modules();
|
unload_modules();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user