Fix #3: Don't guess PID file location, use configure --runstatedir

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-11-24 18:52:31 +01:00
parent 4396004fba
commit 7793fcbd14
5 changed files with 5 additions and 5 deletions

View File

@ -120,7 +120,7 @@ cat <<EOF
$PACKAGE_NAME version $PACKAGE_VERSION
Prefix.........: $prefix
Sysconfdir.....: `eval echo $sysconfdir`
Localstatedir..: `eval echo $localstatedir`
Runstatedir....: `eval echo $runstatedir`
C Compiler.....: $CC $CFLAGS $CPPFLAGS $LDFLAGS $LIBS
Optional features:

View File

@ -50,7 +50,7 @@ static pid_t pidfile_pid = 0;
static void pidfile_cleanup(void);
const char *__pidfile_path = LOCALSTATEDIR "/run";
const char *__pidfile_path = RUNSTATEDIR;
const char *__pidfile_name = NULL;
int

View File

@ -31,7 +31,7 @@ endif
AM_CFLAGS = -W -Wall -Wextra
AM_CFLAGS += -Wno-unused-result -Wno-unused-parameter -fno-strict-aliasing
AM_CPPFLAGS = -DSYSCONFDIR=\"@sysconfdir@\" -DLOCALSTATEDIR=\"@localstatedir@\"
AM_CPPFLAGS = -DSYSCONFDIR=\"@sysconfdir@\" -DRUNSTATEDIR=\"@runstatedir@\"
AM_CPPFLAGS += -D_BSD_SOURCE -D_DEFAULT_SOURCE
syslogd_SOURCES = syslogd.c syslogd.h socket.c socket.h syslog.h queue.h compat.h

View File

@ -45,7 +45,7 @@
static struct syslog_data log = SYSLOG_DATA_INIT;
static char *PidFile = LOCALSTATEDIR "/run/klogd.pid";
static char *PidFile = RUNSTATEDIR "/klogd.pid";
static int kmsg;
static int change_state = 0;

View File

@ -72,7 +72,7 @@
#endif
#ifndef _PATH_LOGPID
#define _PATH_LOGPID LOCALSTATEDIR "/run/syslogd.pid"
#define _PATH_LOGPID RUNSTATEDIR "/syslogd.pid"
#endif
#ifndef _PATH_DEV