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 $PACKAGE_NAME version $PACKAGE_VERSION
Prefix.........: $prefix Prefix.........: $prefix
Sysconfdir.....: `eval echo $sysconfdir` Sysconfdir.....: `eval echo $sysconfdir`
Localstatedir..: `eval echo $localstatedir` Runstatedir....: `eval echo $runstatedir`
C Compiler.....: $CC $CFLAGS $CPPFLAGS $LDFLAGS $LIBS C Compiler.....: $CC $CFLAGS $CPPFLAGS $LDFLAGS $LIBS
Optional features: Optional features:

View File

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

View File

@ -31,7 +31,7 @@ endif
AM_CFLAGS = -W -Wall -Wextra AM_CFLAGS = -W -Wall -Wextra
AM_CFLAGS += -Wno-unused-result -Wno-unused-parameter -fno-strict-aliasing 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 AM_CPPFLAGS += -D_BSD_SOURCE -D_DEFAULT_SOURCE
syslogd_SOURCES = syslogd.c syslogd.h socket.c socket.h syslog.h queue.h compat.h 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 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 kmsg;
static int change_state = 0; static int change_state = 0;

View File

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