Changeset 4990

Show
Ignore:
Timestamp:
10/25/07 11:59:05 (4 years ago)
Author:
khali
Message:

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".

Location:
lm-sensors/branches/lm-sensors-3.0.0
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/CHANGES

    r4989 r4990  
    66              Fix memory leaks on initialization error 
    77              Make the configuration file optional 
     8              Change the default configuration file to /etc/sensors3.conf 
    89  sensord: Reload config on SIGHUP rather than automatically 
    910           No default configuration file name 
     
    1112           Handle the case where voltage measurements aren't available 
    1213           No default configuration file name 
     14  sensors.conf.eg: Install as sensors3.conf 
    1315  sensors-detect: Fix SMSC LPC47B357/M967 detection 
    1416                  Select the right driver for FSC chips 
  • lm-sensors/branches/lm-sensors-3.0.0/INSTALL

    r4876 r4990  
    7272 
    7373The initial output of `sensors' will not be perfect. You have to adjust 
    74 the configuration file (/etc/sensors.conf) to match your motherboard. 
     74the configuration file (/etc/sensors3.conf) to match your motherboard. 
    7575This includes (re)labelling inputs, ignoring unused inputs, changing 
    7676voltage compute lines and setting limits. Write down all the sensor 
  • lm-sensors/branches/lm-sensors-3.0.0/doc/fan-divisors

    r4251 r4990  
    4848 
    4949Put an entry "set fanN_div X" in the appropriate section of 
    50 /etc/sensors.conf and run 'sensors -s' 
     50/etc/sensors3.conf and run 'sensors -s' 
    5151(N is the number of the fan, and X is the divisor you want). 
    5252 
     
    8888As we learned above, you can _not_ fix this by changing 
    8989the fan divisor. You must add entries into the appropriate 
    90 section of /etc/sensors.conf: 
     90section of /etc/sensors3.conf: 
    9191 
    9292        compute fanN  @/2,  2*@ 
  • lm-sensors/branches/lm-sensors-3.0.0/etc/Module.mk

    r4893 r4990  
    2222 
    2323ETCTARGET := $(MODULE_DIR)/sensors.conf.eg 
    24 ETCINSTALL := $(ETCDIR)/sensors.conf 
     24ETCINSTALL := $(ETCDIR)/sensors3.conf 
    2525 
    2626 
  • lm-sensors/branches/lm-sensors-3.0.0/etc/sensors-conf-convert

    r4935 r4990  
    368368        if (defined $ARGV[0] && ($ARGV[0] eq '-h' || $ARGV[0] eq '--help')) { 
    369369                print "Convert sensors.conf from lm-sensors 2 format to lm-sensors 3 format\n", 
    370                       "Typical usage: sensors-conf-convert /etc/sensors.conf\n"; 
     370                      "Typical usage: sensors-conf-convert < /etc/sensors.conf > /etc/sensors3.conf\n"; 
    371371                exit 0; 
    372372        } 
  • lm-sensors/branches/lm-sensors-3.0.0/lib/init.c

    r4989 r4990  
    2121#include <stdlib.h> 
    2222#include <stdio.h> 
     23#include <errno.h> 
    2324#include "sensors.h" 
    2425#include "data.h" 
     
    3031#include "init.h" 
    3132 
    32 #define DEFAULT_CONFIG_FILE     ETCDIR "/sensors.conf" 
     33#define DEFAULT_CONFIG_FILE     ETCDIR "/sensors3.conf" 
     34#define ALT_CONFIG_FILE         ETCDIR "/sensors.conf" 
    3335 
    3436int sensors_init(FILE *input) 
     
    5052                /* No configuration provided, use default */ 
    5153                input = fopen(DEFAULT_CONFIG_FILE, "r"); 
     54                if (!input && errno == ENOENT) 
     55                        input = fopen(ALT_CONFIG_FILE, "r"); 
    5256                if (input) { 
    5357                        if (sensors_scanner_init(input) || 
  • lm-sensors/branches/lm-sensors-3.0.0/lib/libsensors.3

    r4985 r4990  
    173173 
    174174.SH FILES 
     175.I /etc/sensors3.conf 
     176.br 
    175177.I /etc/sensors.conf 
    176178.RS 
    177179The system-wide 
    178180.BR libsensors (3) 
    179 configuration file. 
     181configuration file. /etc/sensors3.conf is tried first, and if it doesn't exist, 
     182/etc/sensors.conf is used instead. 
    180183 
    181184.SH SEE ALSO 
  • lm-sensors/branches/lm-sensors-3.0.0/lib/sensors.conf.5

    r4782 r4990  
    2424.\" References consulted: 
    2525.\"     sensors.conf.eg by Frodo Looijaard 
    26 .TH sensors.conf 5  "September 2007" "lm-sensors 3" "Linux User's Manual" 
     26.TH sensors.conf 5  "October 2007" "lm-sensors 3" "Linux User's Manual" 
    2727.SH NAME 
    2828sensors.conf \- libsensors configuration file 
     
    395395that one takes always precedence. 
    396396 
     397.SH FILES 
     398.I /etc/sensors3.conf 
     399.br 
     400.I /etc/sensors.conf 
     401.RS 
     402The system-wide 
     403.BR libsensors (3) 
     404configuration file. /etc/sensors3.conf is tried first, and if it doesn't exist, 
     405/etc/sensors.conf is used instead. 
     406 
    397407.SH SEE ALSO 
    398408libsensors(3) 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/sensord/sensord.8

    r4987 r4990  
    361361multiple sensor chips having duplicate sensor labels. 
    362362.SH FILES 
     363.I /etc/sensors3.conf 
     364.br 
    363365.I /etc/sensors.conf 
    364366.RS 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/sensors/sensors.1

    r4986 r4990  
    7575than numbers. 
    7676.SH FILES 
     77.I /etc/sensors3.conf 
     78.br 
    7779.I /etc/sensors.conf 
    7880.RS