summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--INSTALL2
-rw-r--r--doc/fan-divisors4
-rw-r--r--etc/Module.mk2
-rwxr-xr-xetc/sensors-conf-convert2
-rw-r--r--lib/init.c6
-rw-r--r--lib/libsensors.35
-rw-r--r--lib/sensors.conf.512
-rw-r--r--prog/sensord/sensord.82
-rw-r--r--prog/sensors/sensors.12
10 files changed, 31 insertions, 8 deletions
diff --git a/CHANGES b/CHANGES
index 536aefaa..2b863d71 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,11 +5,13 @@ SVN HEAD
libsensors: Add a default configuration file
Fix memory leaks on initialization error
Make the configuration file optional
+ Change the default configuration file to /etc/sensors3.conf
sensord: Reload config on SIGHUP rather than automatically
No default configuration file name
sensors: Fix file handle leak on library initialization error
Handle the case where voltage measurements aren't available
No default configuration file name
+ sensors.conf.eg: Install as sensors3.conf
sensors-detect: Fix SMSC LPC47B357/M967 detection
Select the right driver for FSC chips
sensors-detect-stat.pl: Handle alternative chip lists
diff --git a/INSTALL b/INSTALL
index e8ead18c..482ad1cd 100644
--- a/INSTALL
+++ b/INSTALL
@@ -71,7 +71,7 @@ program to get a report of all detected sensor devices. Chek the manual
page for available options.
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
voltage compute lines and setting limits. Write down all the sensor
information your BIOS displays as a hint to what you are supposed to
diff --git a/doc/fan-divisors b/doc/fan-divisors
index 4694cc14..4da50a4b 100644
--- a/doc/fan-divisors
+++ b/doc/fan-divisors
@@ -47,7 +47,7 @@ How to change fan divisors
--------------------------
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).
@@ -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
the fan divisor. You must add entries into the appropriate
-section of /etc/sensors.conf:
+section of /etc/sensors3.conf:
compute fanN @/2, 2*@
diff --git a/etc/Module.mk b/etc/Module.mk
index f71eb08a..f9640236 100644
--- a/etc/Module.mk
+++ b/etc/Module.mk
@@ -21,7 +21,7 @@
MODULE_DIR := etc
ETCTARGET := $(MODULE_DIR)/sensors.conf.eg
-ETCINSTALL := $(ETCDIR)/sensors.conf
+ETCINSTALL := $(ETCDIR)/sensors3.conf
# No all rule
diff --git a/etc/sensors-conf-convert b/etc/sensors-conf-convert
index bceaa979..fb21c6d4 100755
--- a/etc/sensors-conf-convert
+++ b/etc/sensors-conf-convert
@@ -367,7 +367,7 @@ BEGIN
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",
- "Typical usage: sensors-conf-convert /etc/sensors.conf\n";
+ "Typical usage: sensors-conf-convert < /etc/sensors.conf > /etc/sensors3.conf\n";
exit 0;
}
}
diff --git a/lib/init.c b/lib/init.c
index 8dd1f3b7..a355bf4f 100644
--- a/lib/init.c
+++ b/lib/init.c
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <errno.h>
#include "sensors.h"
#include "data.h"
#include "error.h"
@@ -29,7 +30,8 @@
#include "scanner.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)
{
@@ -49,6 +51,8 @@ int sensors_init(FILE *input)
} else {
/* No configuration provided, use default */
input = fopen(DEFAULT_CONFIG_FILE, "r");
+ if (!input && errno == ENOENT)
+ input = fopen(ALT_CONFIG_FILE, "r");
if (input) {
if (sensors_scanner_init(input) ||
sensors_yyparse()) {
diff --git a/lib/libsensors.3 b/lib/libsensors.3
index a80abc1e..ebe33a96 100644
--- a/lib/libsensors.3
+++ b/lib/libsensors.3
@@ -172,11 +172,14 @@ data structures.
A string representing the version of libsensors.
.SH FILES
+.I /etc/sensors3.conf
+.br
.I /etc/sensors.conf
.RS
The system-wide
.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
sensors.conf(5)
diff --git a/lib/sensors.conf.5 b/lib/sensors.conf.5
index 44c2b564..53181f01 100644
--- a/lib/sensors.conf.5
+++ b/lib/sensors.conf.5
@@ -23,7 +23,7 @@
.\"
.\" References consulted:
.\" 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
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,
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
libsensors(3)
diff --git a/prog/sensord/sensord.8 b/prog/sensord/sensord.8
index 476751a3..fb56a7ff 100644
--- a/prog/sensord/sensord.8
+++ b/prog/sensord/sensord.8
@@ -360,6 +360,8 @@ after which the daemon will exit.
Round-robin database support doesn't cope with
multiple sensor chips having duplicate sensor labels.
.SH FILES
+.I /etc/sensors3.conf
+.br
.I /etc/sensors.conf
.RS
The system-wide
diff --git a/prog/sensors/sensors.1 b/prog/sensors/sensors.1
index f359bbdb..8c5b7dd9 100644
--- a/prog/sensors/sensors.1
+++ b/prog/sensors/sensors.1
@@ -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
than numbers.
.SH FILES
+.I /etc/sensors3.conf
+.br
.I /etc/sensors.conf
.RS
The system wide configuration file. See