Updated initialization script, testers wanted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jean Delvare wrote:

<snip>

> 
> Frankly I don't see this change as a major pain. If I thought it did, I
> wouldn't be proposing it. Converting the configuration file from the
> old to the new format is done by 19 lines of shell:
> 
> CONFIG=/etc/sysconfig/lm_sensors
> test -r "$CONFIG" || exit
> 
> unset ${!MODULE_*} $HWMON_MODULES
> . "$CONFIG"
> test -n "$HWMON_MODULES" && exit
> 
> for i in ${!MODULE_*} ; do
> 	eval module=\$$i
> 	if test -z "$HWMON_MODULES" ; then
> 		HWMON_MODULES="$module"
> 	else
> 		HWMON_MODULES="$HWMON_MODULES $module"
> 	fi
> done
> 
> echo >> "$CONFIG"
> echo "# New configuration format generated by sysconfig-lm_sensors-convert" >> "$CONFIG"
> echo "HWMON_MODULES=\"$HWMON_MODULES\"" >> "$CONFIG"
> 
> (Yes, I kept it voluntarily simple, so bus drivers end up in
> HWMON_MODULES, but that's not a problem in practice.)
> 

Ok, as discussed on IRC I'll give up my resistance against this change. If you 
really want to change this I can live with it.

>> 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,
> 
> We already do to some extent, but there's definitely room for
> improvement.
> 
>> (...) then hopefully everything needed will autoload
> 
> Really? I agree for bus drivers, but this seems difficult for hwmon
> chip drivers. Do you have some ideas that you didn't share with us yet?
> 

Well I hope that for graphiccards, the drm / modesetting driver will also 
(probe for?) and instantiate any known to be (sometimes) present i2c sensors.

>> (...) 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.
> 
> My initial goal was to make the configuration file more simple, not
> more complex ;) The main reason why I wanted to split bus drivers and
> hardware monitoring chip drivers is that lm_sensors should be
> considered not configured as long as no hardware monitoring drivers are
> listed. The fact that this will make things a little clearer to the
> users is only a side benefit. Oh, and in a few cases, it is more
> efficient to load the bus drivers first.
> 
> I don't see much value in splitting the variables further.
> 
> Bus drivers will almost always auto-load these days, so these variables
> will almost always be empty. And the trend for graphics adapter is to
> expose I2C buses from the graphics driver itself, so you aren't loading
> the bus drivers just for lm-sensors.
> 
> If we ever have a kernel driver for hard disk temperatures (that would
> be nice!) then I suspect it will be the same driver for all disks, and
> hopefully it will auto-load.
> 
> This leaves us with the hardware monitoring chips themselves. Given
> that it is possible that the same driver is used for the motherboard
> and for the graphics adapter, how would you split them? Sure, you could
> list the module twice, but that's not exactly efficient.
> 
> What benefits do you see in splitting the variables that way?
> 

Oneday I hope we have a tool which will generate and /etc/sensors.conf and 
/etc/sysconfig/lm_sensors based on dmi info and a database, then it would be 
good to have separate line in /etc/sysconfig/lm_sensors, for sensors located on 
the motherboard and sensors located on for example a graphic card, so that that 
tool then can only mangle the motherboard lines, without touching any 
(potentially manually added) other line.

Anyways I've tested your init scripts modifications, and there is one bug, the 
line:
        for $module in $BUS_MODULES $HWMON_MODULES ; do

Should be
        for module in $BUS_MODULES $HWMON_MODULES ; do

IOW $module -> module, this needs to be fixed in *2* places.

Regards,

Hans





[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux