From: Lubos Stanek Date: Mon, 11 Dec 2006 22:34:30 +0000 (+0100) Subject: sensors plugin: Made sensors.conf path configurable X-Git-Tag: collectd-3.11.0~7^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c9596f6cf39a128c10764c3091e6a28186be2303;p=collectd.git sensors plugin: Made sensors.conf path configurable Signed-off-by: Stanek Lubos --- diff --git a/src/sensors.c b/src/sensors.c index 93f93fc3..6ba8154c 100644 --- a/src/sensors.c +++ b/src/sensors.c @@ -179,6 +179,12 @@ static ignorelist_t *sensor_list; static int sensor_extended_naming = 0; #if SENSORS_HAVE_READ +#ifndef SENSORS_CONF_PATH +# define SENSORS_CONF_PATH "/etc/sensors.conf" +#endif +static const char *conffile = SENSORS_CONF_PATH; +/* SENSORS_CONF_PATH */ + typedef struct featurelist { const sensors_chip_name *chip; @@ -254,7 +260,7 @@ static void collectd_sensors_init (void) assert (last_feature == NULL); #endif - if ((fh = fopen ("/etc/sensors.conf", "r")) == NULL) + if ((fh = fopen (conffile, "r")) == NULL) return; if (sensors_init (fh))