Ticket #2174 (closed enhancement: fixed)

Opened 8 years ago

Last modified 5 years ago

Add 'include' functionality for sensors.conf

Reported by: mmh Owned by: khali
Priority: major Milestone: 3.1.0
Component: libsensors Version:
Keywords: Cc:

Description

Add the ability to 'include' other files from sensors.conf. See the mailing list archives for a discussion of this feature.

Change History

Changed 7 years ago by khali

  • component changed from misc to libsensors

Changed 7 years ago by khali

  • milestone changed from 3.0.0 to 3.0.1

Changed 7 years ago by khali

  • milestone changed from 3.0.1 to 3.0.2

Changed 6 years ago by khali

  • milestone changed from 3.0.2 to 3.0.3

Changed 6 years ago by khali

  • milestone changed from 3.0.3 to 3.0.4

Changed 6 years ago by khali

I have been thinking about this for some time now. I am not sure that adding an "include" keyword to sensors.conf, as had been discussed, is the best way to go.

What about having a /etc/libsensors.d directory that would work the same way as /etc/modprobe.d (and many other similar configuration directories) work? The user could simply drop board-specific configuration files there, and libsensors would take care of processing all the files it finds in this directory.

The advantage over adding an "include" keyword are:

  • No configuration file syntax change. This syntax change would cause new configuration files to fail on systems with an older version of libsensors.
  • No need for the user to maintain a central sensors.conf that includes his/her board-specific configuration files.
  • No need to deal with recursion depth issues.

One drawback I can think of is a worse control of the inclusion order. I am not sure if it really matters in practice though, and if it does, we can probably work around it by having libsensors process files in a well-defined order.

Changed 5 years ago by khali

  • owner changed from mmh to khali
  • status changed from new to assigned

Changed 5 years ago by khali

  • status changed from assigned to closed
  • resolution set to fixed

Implemented in r5647.

Note: See TracTickets for help on using tickets.