[lm-sensors] Updated initialization script, testers wanted

Hans de Goede hdegoede at redhat.com
Tue Jan 13 19:45:58 CET 2009

Jean Delvare wrote:
> Hi Hans,
> On Tue, 13 Jan 2009 09:02:33 +0100, Hans de Goede wrote:
>> Jean Delvare wrote:
>>> I have implemented and committed the sensors-detect side of ticket
>>> #2246. Now the lm_sensors initialization script needs to be updated as
>>> well, to make use of the new configuration file syntax. The
>>> initialization script in our repository is meant for Red Hat
>>> distributions but I don't have any, so I can't test my changes. The
>>> patch I intend to apply is attached, could you (or anyone with a Red
>>> Hat distribution) give it a try and confirm that it works OK?
>>> Beforehand, you'll need to download and run the latest version of
>>> sensors-detect:
>>> http://www.lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect
>>> and let it regenerate /etc/sysconfig/lm_sensors.
>> Erm,
>> Not tested, I'm not so happy with this change. I've read the ticker trying to 
>> find out why we would want this change, and I must say I'm not very convinced 
>> with the reasoning there.
>> My problem with these changes is that to me it feels like changing the config 
>> file format without some very strong reasons, this will cause all kind of pains 
>> when upgrading from an lm_sensors version with the old format to that with the 
>> new format. Do we really have to do this?
> The two reasons that motivated the change are explained in the ticket,
> there's not so much I can add:
> 1* Removing or adding a module manually is error-prone. Say you have
> the following configuration file:
> MODULE_0=lm90
> MODULE_1=k8temp
> MODULE_2=it87
> Now you change your graphics adapter and the new one no longer has a
> thermal sensor, so you no longer need to load the lm90 driver. Simply
> removing the first line may or may not be enough, depending on how the
> initialization script is implemented. Apparently the one in openSUSE
> copes with that, but the one in our repository (which I think you use
> in Red Hat) doesn't.
> 2* The old format can't be edited with Yast's sysconfig editor, as the
> editor expects fixed variable names. I find it pretty convenient for
> the user to be able to edit all the system settings in a central place,
> with settings put in a function-oriented tree, and a help text for every
> setting. I don't know if Red Hat has an equivalent tool, but if it does
> then I expect it to have the same problem with the current lm-sensors
> configuration file format. It is much easier for me to tell a user to
> open the sysconfig editor and change the value of variable
> HWMON_MODULES to "foo bar" than to tell him/her to
> open /etc/sysconfig/lm_sensors with a text editor, check the highest
> MODULE_%d variable, and add a new line MODULE_%(d+1)=bar.

Hmm, 1 is sort of silly IMHO if you are making changes renumbering really isn't 
that hard to do, 2 to me feels like causing pain for all distros for the 
benefit of one.

Anyways if we are going to make changes to the format, yes we will need a 
migration script and, I think we need to think this through more.

To be more specific in the future we might / will hopefully get support for 
hwmon on graphics cards, then hopefully everything needed will autoload but we 
might need entries in /etc/sysconfig/lm_sensors, so I'm thinking that it would 
be good to have separate lines for things like motherboard sensors, gpu sensors 
and harddisk sensors. This will make it easier for both manual editing as for 
tools for (automatic) configuration.



More information about the lm-sensors mailing list