diff --git a/prog/sensord/Module.mk b/prog/sensord/Module.mk index 7556b66a..9e989778 100644 --- a/prog/sensord/Module.mk +++ b/prog/sensord/Module.mk @@ -27,17 +27,17 @@ PROGSENSORDMAN1FILES := $(MODULE_DIR)/sensord.8 # Regrettably, even 'simply expanded variables' will not put their currently # defined value verbatim into the command-list of rules... PROGSENSORDTARGETS := $(MODULE_DIR)/sensord -PROGSENSORDSOURCES := $(MODULE_DIR)/args.c $(MODULE_DIR)/chips.c $(MODULE_DIR)/lib.c $(MODULE_DIR)/sense.c $(MODULE_DIR)/sensord.c +PROGSENSORDSOURCES := $(MODULE_DIR)/args.c $(MODULE_DIR)/chips.c $(MODULE_DIR)/lib.c $(MODULE_DIR)/rrd.c $(MODULE_DIR)/sense.c $(MODULE_DIR)/sensord.c # Include all dependency files. We use '.rd' to indicate this will create # executables. INCLUDEFILES += $(PROGSENSORDSOURCES:.c=.rd) $(PROGSENSORDTARGETS): $(PROGSENSORDSOURCES:.c=.ro) lib/$(LIBSHBASENAME) - $(CC) -o $@ $(PROGSENSORDSOURCES:.c=.ro) -Llib -lsensors + $(CC) -o $@ $(PROGSENSORDSOURCES:.c=.ro) -Llib -lsensors -lrrd all-prog-sensord: $(PROGSENSORDTARGETS) -all :: all-prog-sensord +# all :: all-prog-sensord install-prog-sensord: all-prog-sensord $(MKDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(PROGSENSORDMAN1DIR) diff --git a/prog/sensord/args.c b/prog/sensord/args.c index 572b1c32..b2c6bafb 100644 --- a/prog/sensord/args.c +++ b/prog/sensord/args.c @@ -3,7 +3,7 @@ * * A daemon that periodically logs sensor information to syslog. * - * Copyright (c) 1999-2001 Merlin Hughes + * Copyright (c) 1999-2002 Merlin Hughes * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,11 +34,15 @@ int isDaemon = 0; const char *sensorsCfgFile = "sensors.conf"; const char *pidFile = "/var/run/sensord.pid"; +const char *rrdFile = NULL; +const char *cgiDir = NULL; int scanTime = 60; int logTime = 30 * 60; +int rrdTime = 5 * 60; int syslogFacility = LOG_LOCAL4; int doScan = 0; int doSet = 0; +int doCGI = 0; int debug = 0; sensors_chip_name chipNames[MAX_CHIP_NAMES]; int numChipNames = 0; @@ -92,24 +96,32 @@ parseFacility static const char *daemonSyntax = " -i, --interval