summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-03-26 22:24:57 +0000
committerLennart Poettering <lennart@poettering.net>2008-03-26 22:24:57 +0000
commita1f1e2779999599ce02525148d13facce46f8ced (patch)
treef7d6deff4ed9870d41473db7364ab0a7a89d471f
parent24fb7e886251e5e836f1a54463ba9e5bab792be7 (diff)
Respect what the user requested as localstate directory, rather than hardcoding /var. Patch from Flameeyes
git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@135 153bfa13-eec0-0310-be40-b0cb6a0e1b4b
-rw-r--r--libdaemon/Makefile.am2
-rw-r--r--libdaemon/dpid.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/libdaemon/Makefile.am b/libdaemon/Makefile.am
index 82733e7..05fd80f 100644
--- a/libdaemon/Makefile.am
+++ b/libdaemon/Makefile.am
@@ -17,6 +17,8 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
# USA
+AM_CPPFLAGS='-DLOCALSTATEDIR="$(localstatedir)"'
+
pkginclude_HEADERS = \
dlog.h \
dfork.h \
diff --git a/libdaemon/dpid.c b/libdaemon/dpid.c
index 39c87f4..ee0b2e8 100644
--- a/libdaemon/dpid.c
+++ b/libdaemon/dpid.c
@@ -48,7 +48,7 @@
#define PATH_MAX 512
#endif
-#define VARRUN "/var/run"
+#define VARRUN LOCALSTATEDIR "/run"
const char *daemon_pid_file_ident = NULL;
daemon_pid_file_proc_t daemon_pid_file_proc = daemon_pid_file_proc_default;