Changeset 5590

Show
Ignore:
Timestamp:
01/12/09 17:17:51 (4 years ago)
Author:
khali
Message:

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.

Location:
lm-sensors/branches/lm-sensors-3.0.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/CHANGES

    r5588 r5590  
    5555                  Add Intel Core I7 support 
    5656                  Generate new format for /etc/sysconfig/lm_sensors 
     57                  Print warnings about missing modules on screen 
    5758  sensors-detect-stat.pl: Delete (functionality merged into sensors-detect) 
    5859 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect

    r5589 r5590  
    51185118        } 
    51195119        if ($ipmi) { 
    5120                 $modprobes .= "# You must also install and load the IPMI modules\n"; 
    51215120                $modprobes .= "modprobe ipmi-si\n"; 
    51225121                $bus_modules{"ipmi-si"}++; 
     
    51285127                next if not @{$chips_detected{$driver}}; 
    51295128                if ($driver eq "to-be-written") { 
    5130                         $modprobes .= "# no driver for ${$chips_detected{$driver}}[0]{chipname} yet\n"; 
     5129                        print "Note: there is no driver for ${$chips_detected{$driver}}[0]{chipname} yet.\n". 
     5130                              "Check http://www.lm-sensors.org/wiki/Devices for updates.\n\n"; 
    51315131                } else { 
    51325132                        open(local *INPUTFILE, "modprobe -l $driver 2>/dev/null |"); 
     
    51435143                        # isn't supported 
    51445144                        if ((($? >> 8) == 0) && ! $modulefound) { 
    5145                                 $modprobes .= "# Warning: the required module $driver is not currently installed\n". 
    5146                                               "# on your system. For status of 2.6 kernel ports check\n". 
    5147                                               "# http://www.lm-sensors.org/wiki/Devices. If driver is built\n". 
    5148                                               "# into the kernel, or unavailable, comment out the following line.\n"; 
     5145                                print "Warning: the required module $driver is not currently installed\n". 
     5146                                      "on your system. If it is built into the kernel then it's OK.\n". 
     5147                                      "Otherwise, check http://www.lm-sensors.org/wiki/Devices for\n". 
     5148                                      "driver availability.\n\n"; 
     5149                        } else { 
     5150                                $modprobes .= "modprobe $driver\n"; 
     5151                                $hwmon_modules{$driver}++; 
    51495152                        } 
    5150                         $modprobes .= "modprobe $driver\n"; 
    5151                         $hwmon_modules{$driver}++; 
    51525153                } 
    51535154        } 
     
    54095410 
    54105411        my ($modprobes, $configfile, $bus_modules, $hwmon_modules) = generate_modprobes(); 
    5411         write_config($modprobes, $configfile, $bus_modules, $hwmon_modules); 
     5412 
     5413        if (@{$hwmon_modules}) { 
     5414                write_config($modprobes, $configfile, $bus_modules, $hwmon_modules); 
     5415        } else { 
     5416                print "No modules to load, skipping modules configuration.\n\n"; 
     5417        } 
    54125418 
    54135419        unload_modules();