mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 22:35:23 +00:00
Use /etc/sensors3.conf as the default configuration file. If it can't
be found, fallback to /etc/sensors.conf. This allows for an old libsensors and a new libsensors to be installed in parallel, and each one has its own configuration file. One important change here is that the default configuration file will be installed as /etc/sensors3.conf by "make install". git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4990 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -5,11 +5,13 @@ SVN HEAD
|
|||||||
libsensors: Add a default configuration file
|
libsensors: Add a default configuration file
|
||||||
Fix memory leaks on initialization error
|
Fix memory leaks on initialization error
|
||||||
Make the configuration file optional
|
Make the configuration file optional
|
||||||
|
Change the default configuration file to /etc/sensors3.conf
|
||||||
sensord: Reload config on SIGHUP rather than automatically
|
sensord: Reload config on SIGHUP rather than automatically
|
||||||
No default configuration file name
|
No default configuration file name
|
||||||
sensors: Fix file handle leak on library initialization error
|
sensors: Fix file handle leak on library initialization error
|
||||||
Handle the case where voltage measurements aren't available
|
Handle the case where voltage measurements aren't available
|
||||||
No default configuration file name
|
No default configuration file name
|
||||||
|
sensors.conf.eg: Install as sensors3.conf
|
||||||
sensors-detect: Fix SMSC LPC47B357/M967 detection
|
sensors-detect: Fix SMSC LPC47B357/M967 detection
|
||||||
Select the right driver for FSC chips
|
Select the right driver for FSC chips
|
||||||
sensors-detect-stat.pl: Handle alternative chip lists
|
sensors-detect-stat.pl: Handle alternative chip lists
|
||||||
|
2
INSTALL
2
INSTALL
@@ -71,7 +71,7 @@ program to get a report of all detected sensor devices. Chek the manual
|
|||||||
page for available options.
|
page for available options.
|
||||||
|
|
||||||
The initial output of `sensors' will not be perfect. You have to adjust
|
The initial output of `sensors' will not be perfect. You have to adjust
|
||||||
the configuration file (/etc/sensors.conf) to match your motherboard.
|
the configuration file (/etc/sensors3.conf) to match your motherboard.
|
||||||
This includes (re)labelling inputs, ignoring unused inputs, changing
|
This includes (re)labelling inputs, ignoring unused inputs, changing
|
||||||
voltage compute lines and setting limits. Write down all the sensor
|
voltage compute lines and setting limits. Write down all the sensor
|
||||||
information your BIOS displays as a hint to what you are supposed to
|
information your BIOS displays as a hint to what you are supposed to
|
||||||
|
@@ -47,7 +47,7 @@ How to change fan divisors
|
|||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
Put an entry "set fanN_div X" in the appropriate section of
|
Put an entry "set fanN_div X" in the appropriate section of
|
||||||
/etc/sensors.conf and run 'sensors -s'
|
/etc/sensors3.conf and run 'sensors -s'
|
||||||
(N is the number of the fan, and X is the divisor you want).
|
(N is the number of the fan, and X is the divisor you want).
|
||||||
|
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ outputs 4 pulses by revolution, instead of the standard 2.
|
|||||||
|
|
||||||
As we learned above, you can _not_ fix this by changing
|
As we learned above, you can _not_ fix this by changing
|
||||||
the fan divisor. You must add entries into the appropriate
|
the fan divisor. You must add entries into the appropriate
|
||||||
section of /etc/sensors.conf:
|
section of /etc/sensors3.conf:
|
||||||
|
|
||||||
compute fanN @/2, 2*@
|
compute fanN @/2, 2*@
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
MODULE_DIR := etc
|
MODULE_DIR := etc
|
||||||
|
|
||||||
ETCTARGET := $(MODULE_DIR)/sensors.conf.eg
|
ETCTARGET := $(MODULE_DIR)/sensors.conf.eg
|
||||||
ETCINSTALL := $(ETCDIR)/sensors.conf
|
ETCINSTALL := $(ETCDIR)/sensors3.conf
|
||||||
|
|
||||||
|
|
||||||
# No all rule
|
# No all rule
|
||||||
|
@@ -367,7 +367,7 @@ BEGIN
|
|||||||
|
|
||||||
if (defined $ARGV[0] && ($ARGV[0] eq '-h' || $ARGV[0] eq '--help')) {
|
if (defined $ARGV[0] && ($ARGV[0] eq '-h' || $ARGV[0] eq '--help')) {
|
||||||
print "Convert sensors.conf from lm-sensors 2 format to lm-sensors 3 format\n",
|
print "Convert sensors.conf from lm-sensors 2 format to lm-sensors 3 format\n",
|
||||||
"Typical usage: sensors-conf-convert /etc/sensors.conf\n";
|
"Typical usage: sensors-conf-convert < /etc/sensors.conf > /etc/sensors3.conf\n";
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
#include "sensors.h"
|
#include "sensors.h"
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@@ -29,7 +30,8 @@
|
|||||||
#include "scanner.h"
|
#include "scanner.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
|
|
||||||
#define DEFAULT_CONFIG_FILE ETCDIR "/sensors.conf"
|
#define DEFAULT_CONFIG_FILE ETCDIR "/sensors3.conf"
|
||||||
|
#define ALT_CONFIG_FILE ETCDIR "/sensors.conf"
|
||||||
|
|
||||||
int sensors_init(FILE *input)
|
int sensors_init(FILE *input)
|
||||||
{
|
{
|
||||||
@@ -49,6 +51,8 @@ int sensors_init(FILE *input)
|
|||||||
} else {
|
} else {
|
||||||
/* No configuration provided, use default */
|
/* No configuration provided, use default */
|
||||||
input = fopen(DEFAULT_CONFIG_FILE, "r");
|
input = fopen(DEFAULT_CONFIG_FILE, "r");
|
||||||
|
if (!input && errno == ENOENT)
|
||||||
|
input = fopen(ALT_CONFIG_FILE, "r");
|
||||||
if (input) {
|
if (input) {
|
||||||
if (sensors_scanner_init(input) ||
|
if (sensors_scanner_init(input) ||
|
||||||
sensors_yyparse()) {
|
sensors_yyparse()) {
|
||||||
|
@@ -172,11 +172,14 @@ data structures.
|
|||||||
A string representing the version of libsensors.
|
A string representing the version of libsensors.
|
||||||
|
|
||||||
.SH FILES
|
.SH FILES
|
||||||
|
.I /etc/sensors3.conf
|
||||||
|
.br
|
||||||
.I /etc/sensors.conf
|
.I /etc/sensors.conf
|
||||||
.RS
|
.RS
|
||||||
The system-wide
|
The system-wide
|
||||||
.BR libsensors (3)
|
.BR libsensors (3)
|
||||||
configuration file.
|
configuration file. /etc/sensors3.conf is tried first, and if it doesn't exist,
|
||||||
|
/etc/sensors.conf is used instead.
|
||||||
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
sensors.conf(5)
|
sensors.conf(5)
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" References consulted:
|
.\" References consulted:
|
||||||
.\" sensors.conf.eg by Frodo Looijaard
|
.\" sensors.conf.eg by Frodo Looijaard
|
||||||
.TH sensors.conf 5 "September 2007" "lm-sensors 3" "Linux User's Manual"
|
.TH sensors.conf 5 "October 2007" "lm-sensors 3" "Linux User's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
sensors.conf \- libsensors configuration file
|
sensors.conf \- libsensors configuration file
|
||||||
|
|
||||||
@@ -394,6 +394,16 @@ the feature is in the same class as the feature the statement contains,
|
|||||||
and there is anywhere else a statement for this specific class member,
|
and there is anywhere else a statement for this specific class member,
|
||||||
that one takes always precedence.
|
that one takes always precedence.
|
||||||
|
|
||||||
|
.SH FILES
|
||||||
|
.I /etc/sensors3.conf
|
||||||
|
.br
|
||||||
|
.I /etc/sensors.conf
|
||||||
|
.RS
|
||||||
|
The system-wide
|
||||||
|
.BR libsensors (3)
|
||||||
|
configuration file. /etc/sensors3.conf is tried first, and if it doesn't exist,
|
||||||
|
/etc/sensors.conf is used instead.
|
||||||
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
libsensors(3)
|
libsensors(3)
|
||||||
|
|
||||||
|
@@ -360,6 +360,8 @@ after which the daemon will exit.
|
|||||||
Round-robin database support doesn't cope with
|
Round-robin database support doesn't cope with
|
||||||
multiple sensor chips having duplicate sensor labels.
|
multiple sensor chips having duplicate sensor labels.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
|
.I /etc/sensors3.conf
|
||||||
|
.br
|
||||||
.I /etc/sensors.conf
|
.I /etc/sensors.conf
|
||||||
.RS
|
.RS
|
||||||
The system-wide
|
The system-wide
|
||||||
|
@@ -74,6 +74,8 @@ buses of the same type. As bus numbers are usually not guaranteed to be stable
|
|||||||
over reboots, these statements let you refer to each bus by its name rather
|
over reboots, these statements let you refer to each bus by its name rather
|
||||||
than numbers.
|
than numbers.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
|
.I /etc/sensors3.conf
|
||||||
|
.br
|
||||||
.I /etc/sensors.conf
|
.I /etc/sensors.conf
|
||||||
.RS
|
.RS
|
||||||
The system wide configuration file. See
|
The system wide configuration file. See
|
||||||
|
Reference in New Issue
Block a user