| 5262 | | print "# sensors-detect revision $revision\n"; |
| 5263 | | print "\nThis program will help you determine which I2C/SMBus modules you need to\n", |
| 5264 | | "load to use lm_sensors most effectively. You need to have i2c and\n", |
| 5265 | | "lm_sensors installed before running this program.\n"; |
| 5266 | | print "If you have patched your kernel and have some drivers built in, you can\n", |
| 5267 | | "safely answer NO if asked to load some modules. In this case, things may\n", |
| 5268 | | "seem a bit confusing, but they will still work.\n\n"; |
| 5269 | | print "It is generally safe and recommended to accept the default answers to all\n", |
| 5270 | | "questions, unless you know what you're doing.\n\n"; |
| 5271 | | |
| 5272 | | print " We can start with probing for (PCI) I2C or SMBus adapters.\n"; |
| 5273 | | print " Do you want to probe now? (YES/no): "; |
| | 5262 | print "# sensors-detect revision $revision\n\n"; |
| | 5263 | |
| | 5264 | print "This program will help you determine which kernel modules you need\n", |
| | 5265 | "to load to use lm_sensors most effectively. It is generally safe\n", |
| | 5266 | "and recommended to accept the default answers to all questions,\n", |
| | 5267 | "unless you know what you're doing.\n"; |
| | 5268 | print "You need to have i2c and lm_sensors installed before running this\n", |
| | 5269 | "program.\n" |
| | 5270 | unless kernel_version_at_least(2, 6, 0); |
| | 5271 | print "\n"; |
| | 5272 | |
| | 5273 | print "We can start with probing for (PCI) I2C or SMBus adapters.\n"; |
| | 5274 | print "Do you want to probe now? (YES/no): "; |
| 5308 | | print " To continue, we need module `i2c-dev' to be loaded.\n"; |
| 5309 | | print " If it is built-in into your kernel, you can safely skip this.\n"; |
| 5310 | | if (exists($modules_list{"i2c-dev"})) { |
| 5311 | | print "i2c-dev is already loaded.\n"; |
| 5312 | | } else { |
| 5313 | | print "i2c-dev is not loaded. Do you want to load it now? (YES/no): "; |
| | 5308 | if (!exists($modules_list{"i2c-dev"}) && ! -e "/sys/class/i2c-dev") { |
| | 5309 | print "To continue, we need module `i2c-dev' to be loaded.\n"; |
| | 5310 | print "If it is built-in into your kernel, you can safely skip this.\n" |
| | 5311 | unless kernel_version_at_least(2, 6, 0); |
| | 5312 | print "Do you want to load `i2c-dev' now? (YES/no): "; |
| 5327 | | print "\n We are now going to do the adapter probings. Some adapters may ", |
| 5328 | | "hang halfway\n", |
| 5329 | | " through; we can't really help that. Also, some chips will be double ", |
| 5330 | | "detected;\n", |
| 5331 | | " we choose the one with the highest confidence value in that case.\n", |
| 5332 | | " If you found that the adapter hung after probing a certain address, ", |
| 5333 | | "you can\n", |
| 5334 | | " specify that address to remain unprobed. That ", |
| 5335 | | "often\n", |
| 5336 | | " includes address 0x69 (clock chip).\n"; |
| | 5327 | print "We are now going to do the I2C/SMBus adapter probings. Some chips may\n", |
| | 5328 | "be double detected; we choose the one with the highest confidence value\n", |
| | 5329 | "in that case.\n", |
| | 5330 | "If you found that the adapter hung after probing a certain address, you\n", |
| | 5331 | "can specify that address to remain unprobed.\n"; |
| 5364 | | |
| 5365 | | print "\nSome chips are also accessible through the ISA I/O ports. ISA probes are\n". |
| 5366 | | "typically a bit more dangerous, as we have to write to I/O ports to do\n". |
| 5367 | | "this. This is usually safe though.\n". |
| 5368 | | "Yes, you do have ISA I/O ports even if you do not have any ISA slots!\n\n"; |
| | 5359 | print "\n"; |
| | 5360 | |
| | 5361 | print "Some chips are also accessible through the ISA I/O ports. We have to\n". |
| | 5362 | "write to arbitrary I/O ports to do this. This is usually safe though.\n". |
| | 5363 | "Yes, you do have ISA I/O ports even if you do not have any ISA slots!\n"; |
| 5391 | | print "\n Sorry, no chips were detected.\n", |
| 5392 | | " Either your sensors are not supported, or they are\n", |
| 5393 | | " connected to an I2C bus adapter that we do not support.\n", |
| 5394 | | " See doc/FAQ, doc/lm_sensors-FAQ.html, and\n", |
| 5395 | | " http://www.lm-sensors.org/wiki/FAQ\n", |
| 5396 | | " (FAQ #4.24.3) for further information.\n", |
| 5397 | | " If you find out what chips are on your board, see\n", |
| 5398 | | " http://www.lm-sensors.org/wiki/NewDrivers for driver status.\n"; |
| | 5387 | print "Sorry, no sensors were detected.\n", |
| | 5388 | "Either your sensors are not supported, or they are connected to an\n", |
| | 5389 | "I2C or SMBus adapter that is not supported. See doc/FAQ,\n", |
| | 5390 | "doc/lm_sensors-FAQ.html or http://www.lm-sensors.org/wiki/FAQ\n", |
| | 5391 | "(FAQ #4.24.3) for further information.\n", |
| | 5392 | "If you find out what chips are on your board, see\n", |
| | 5393 | "http://www.lm-sensors.org/wiki/NewDrivers for driver status.\n"; |
| 5445 | | print "#----cut here----\n"; |
| 5446 | | print $configfile; |
| 5447 | | print "#----cut here----\n"; |
| 5448 | | print "\nTo load everything that is needed, add this to some /etc/rc* ", |
| 5449 | | "file:\n\n"; |
| 5450 | | print "#----cut here----\n"; |
| 5451 | | print $modprobes; |
| 5452 | | print "# sleep 2 # optional\n", |
| 5453 | | "/usr/local/bin/sensors -s # recommended\n"; |
| 5454 | | print "#----cut here----\n"; |
| 5455 | | print "\nWARNING! If you have some things built into your kernel, the list above\n", |
| 5456 | | "will contain too many modules. Skip the appropriate ones! You really should\n", |
| 5457 | | "try these commands right now to make sure everything is working properly.\n", |
| 5458 | | "Monitoring programs won't work until it's done.\n"; |
| | 5443 | print "#----cut here----\n". |
| | 5444 | $configfile. |
| | 5445 | "#----cut here----\n\n"; |
| | 5446 | |
| | 5447 | print "To load everything that is needed, add this to some /etc/rc* file:\n\n"; |
| | 5448 | print "#----cut here----\n". |
| | 5449 | $modprobes. |
| | 5450 | "# sleep 2 # optional\n". |
| | 5451 | "/usr/local/bin/sensors -s # recommended\n". |
| | 5452 | "#----cut here----\n\n"; |
| | 5453 | |
| | 5454 | print "If you have some drivers built into your kernel, the list above will\n". |
| | 5455 | "contain too many modules. Skip the appropriate ones! You really\n". |
| | 5456 | "should try these commands right now to make sure everything is\n". |
| | 5457 | "working properly. Monitoring programs won't work until the needed\n". |
| | 5458 | "modules are loaded.\n\n"; |