Changeset 2372

Show
Ignore:
Timestamp:
03/20/04 10:29:50 (9 years ago)
Author:
khali
Message:

Drop support of undetectable adapters.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/detect/sensors-detect

    r2367 r2372  
    33# 
    44#    sensors-detect - Detect PCI bus and chips 
    5 #    Copyright (c) 1998 - 2002  Frodo Looijaard <frodol@dds.nl> 
     5#    Copyright (C) 1998 - 2002  Frodo Looijaard <frodol@dds.nl> 
     6#    Copyright (C) 2000 - 2004  The lm_sensors team 
    67# 
    78#    This program is free software; you can redistribute it and/or modify 
     
    4546######################### 
    4647 
    47 use vars qw(@pci_adapters @chip_ids @superio_ids @undetectable_adapters); 
    48  
    49 @undetectable_adapters = ( 'i2c-elektor', 'i2c-elv', 'i2c-philips-par', 
    50                            'i2c-velleman' ); 
     48use vars qw(@pci_adapters @chip_ids @superio_ids); 
    5149 
    5250# This is the list of SMBus or I2C adapters we recognize by their PCI 
     
    43074305sub main 
    43084306{ 
    4309   my (@adapters,$res,$did_adapter_detection,$detect_others,$adapter); 
     4307  my (@adapters,$res,$did_adapter_detection,$adapter); 
    43104308 
    43114309  initialize_conf; 
     
    43444342 
    43454343  if (not $did_adapter_detection) { 
    4346     print " As you skipped adapter detection, we will only scan already ", 
    4347           "loaded adapter\n", 
    4348           " modules. You can still be prompted for non-detectable adapters.\n", 
    4349           " Do you want to? (yes/NO): "; 
    4350     $detect_others = <STDIN> =~ /^\s*[Yy]/; 
     4344    print "As you skipped adapter detection, we will only scan already loaded\n". 
     4345          "adapter modules.\n"; 
    43514346  } elsif ($> != 0) { 
    4352     print " As you are not root, we can't load adapter modules. We will only ", 
    4353           "scan\n", 
    4354           " already loaded adapters.\n"; 
    4355     $detect_others = 0; 
     4347    print "As you are not root, we can't load adapter modules. We will only scan\n". 
     4348          "already loaded adapters.\n"; 
    43564349  } else { 
    4357     print " We will now try to load each adapter module in turn.\n"; 
     4350    print "We will now try to load each adapter module in turn.\n"; 
    43584351    foreach $adapter (@adapters) { 
    43594352      next if $adapter eq "DISABLED"; 
     
    43744367      } 
    43754368    } 
    4376     print " Do you now want to be prompted for non-detectable adapters? ", 
    4377           "(yes/NO): "; 
    4378     $detect_others = <STDIN> =~ /^\s*[Yy]/ ; 
    4379   } 
    4380  
    4381   if ($detect_others) { 
    4382     foreach $adapter (@undetectable_adapters) { 
    4383       print "Load `$adapter' (say NO if built into your kernel)? (YES/no): "; 
    4384       unless (<STDIN> =~ /^\s*[Nn]/) { 
    4385         if (system ("modprobe", $adapter)) { 
    4386           print "Loading failed... skipping.\n"; 
    4387         } else { 
    4388           print "Module loaded succesfully.\n"; 
    4389         } 
    4390       } 
    4391     } 
    4392   } 
     4369  } 
     4370 
     4371  print "If you have undetectable or unsupported adapters, you can have them\n". 
     4372        "scanned by manually loading the modules before running this script.\n\n"; 
    43934373 
    43944374  print " To continue, we need module `i2c-dev' to be loaded.\n";