From 1d1859040b64bbdeb85c7e7484516d7a48f12494 Mon Sep 17 00:00:00 2001 From: Merlin Hughes Date: Sun, 11 Feb 2001 18:51:24 +0000 Subject: [PATCH] Added -p/--pid-file option to write a PID file for the daemon and -d/--debug option to allow unwanted information to be more easily suppressed. Kicked version to 0.5.0. -- merlin@merlin.org git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1024 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/sensord/args.c | 21 +++++++++++++--- prog/sensord/chips.c | 2 +- prog/sensord/lib.c | 2 +- prog/sensord/sense.c | 9 ++++--- prog/sensord/sensord.8 | 55 +++++++++++++++++++++++------------------- prog/sensord/sensord.c | 35 ++++++++++++++++++++++----- prog/sensord/sensord.h | 6 +++-- 7 files changed, 89 insertions(+), 41 deletions(-) diff --git a/prog/sensord/args.c b/prog/sensord/args.c index 1494baa0..572b1c32 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-2000 Merlin Hughes + * Copyright (c) 1999-2001 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 @@ -33,11 +33,13 @@ int isDaemon = 0; const char *sensorsCfgFile = "sensors.conf"; +const char *pidFile = "/var/run/sensord.pid"; int scanTime = 60; int logTime = 30 * 60; int syslogFacility = LOG_LOCAL4; int doScan = 0; int doSet = 0; +int debug = 0; sensors_chip_name chipNames[MAX_CHIP_NAMES]; int numChipNames = 0; @@ -92,6 +94,8 @@ static const char *daemonSyntax = " -l, --log-interval