Hey all, It's been a while since I've posted the first patch and I've had no response yet. Luckily, I was able to improve the script some more in the meantime, so I would like to send in a new patch. Comments and flames are welcome ;) The patch supports: * Command line parameters (--automatic, --manual, --version, --verbose, --help, --update) * Looks up DMI information and tries to match this with a config file in /usr/share/lmsensors/motherboards * Ability to update /usr/share/lmsensors/motherboards with database (Note: This database is currently a DUMMY and does not contain any usuable information suitable for anything besides testing). * Proccesses the config file if found. New since last patch: * Escaping of slashes in filenames. * Check for updates before downloading the update * Saves a dump of DMI information to file. * Don't initialize DMI information if DMI detection is not enabled * Displays annotated comments in configfiles - Some code cleanup - Added comments Config files are parsed as following: It looks in /usr/share/lmsensors/motherboards for a filename matching system-manufacturer - baseboard-manufacturer - system-product-name - baseboard-product-name - system-version - baseboard-version. (Without the spaces ofcourse ;)). If it can't find this config, it will look for an alternate revision: everything with a different version number. It lists these config files and lets the user decide whether to load them or not. If a configuration file is finally loaded, it looks through it for lines starting with: # modprobe These modules will be (auto)loaded. It also parses lines with: # Comment: blablabla And prints * blablabla. This is done (i.e.) to notify a user if a configuration is found, but the motherboard has no hardware monitoring capabilities. = I've also added a shellscript which can be added to the lmsensors startupscript in /etc/init.d/. This script check for modified DMI information (I.E. new motherboard) and then tries to autodetect the motherboard using this information. Because attachments seem to get filtered out when I send them to the list, I've also uploaded them at: Patch: http://www.pinkelmans.nl/prive/sensors/sensors-detect-20070530.patch Shellscript: http://www.pinkelmans.nl/prive/sensors/shell Ivo Manca ----- Original Message ----- From: "Ivo Manca" <pinkel at gmail.com> To: <lm-sensors at lm-sensors.org> Cc: <J.W.R.deGoede at hhs.nl>; "Jasper Alias" <jasperalias at hotmail.com>; "Weg, G. van der" <g.vanderweg at student.hhs.nl>; "Jean Delvare" <khali at linux-fr.org>; <ejl at eberian.com> Sent: Monday 14 May 2007 13:13 Subject: Sensors-detect with DMI information, requirements & first version: Requestion comment > Hey all, > > Please find attached the (patch for) first version of the updated > sensors-detect. This patch adds support for looking up sensors > configurations while using DMI information. It applies to the 3.0.0 branch > of lmsensors. > > Information about the patch: > * Adds command line parameters > (--automatic, --manual, --version, --verbose, --help, --update) > * Looks up DMI information and tries to match this with a config file in > /usr/share/lmsensors/motherboards > * Ability to update /usr/share/lmsensors/motherboards with database (Note: > This database is currently a DUMMY and does not contain any usuable > information suitable for anything besides testing). > * Proccesses the config file if found. > > It seems like it's already near to a complete working version. Every > comment > will be appriciated. > If you want to find a checklist with the implemented functions, please > check: http://www.pinkelmans.nl/prive/sensors/Checklist.pdf > > Note 1: The script currentently does not yet escapes backslashes for > filenames, this will be added soon. > Note 2: To make the patch more readable, there are no spaces added to > nearly > every line inside the mainfunction of sensors-detect. Therefor the patched > verion of sensors-detect itself might be hard to read. A patch with the > added spaces (etc) will be submitted next week or so. > Note 3: The ability to only download configurations suitable for the > current > architecture will be added if time permits. > > Requirements for sensors-detect (Ivo Manca): > http://www.pinkelmans.nl/prive/sensors/sensors_detect-req.pdf > Requirements for website (Jasper Alias): > http://www.pinkelmans.nl/prive/sensors/website-req.pdf > Please feel free to comment on these requirements or to ask us to > eleberate > them. > > Information about the sensors-detect discussion can be found: > http://lists.lm-sensors.org/pipermail/lm-sensors/2007-March/thread.html#19332 > http://lists.lm-sensors.org/pipermail/lm-sensors/2007-March/thread.html#19008 > http://lists.lm-sensors.org/pipermail/lm-sensors/2007-February/thread.html#18932 > > Ivo Manca > Jasper Alias > Gijs van der Weg > -------------- next part -------------- A non-text attachment was scrubbed... Name: shell Type: application/octet-stream Size: 700 bytes Desc: not available Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070530/dd29ae76/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: sensors-detect-20070530.patch Type: application/octet-stream Size: 17398 bytes Desc: not available Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070530/dd29ae76/attachment-0001.obj