aboutsummaryrefslogtreecommitdiffstats
path: root/community/kea/use-runstatedir-for-pid-file-location.patch
blob: 9a386693333a30a8232938d5320235c427df7eb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: =?utf-8?b?T25kxZllaiBTdXLDvQ==?= <ondrej@sury.org>
Date: Tue, 19 Feb 2019 12:55:42 +0000
Subject: Use runstatedir for pid file location

Patch-Source: https://sources.debian.org/src/isc-kea/1.5.0-2/debian/patches/0004-Use-runstatedir-for-pid-file-location.patch/ (modified)

--- a/src/lib/process/daemon.cc
+++ b/src/lib/process/daemon.cc
@@ -40,7 +40,7 @@
 
 Daemon::Daemon()
     : signal_set_(), config_file_(""),
-      pid_file_dir_(DATA_DIR), pid_file_(), am_file_author_(false),
+      pid_file_dir_(KEA_PIDFILE_DIR), pid_file_(), am_file_author_(false),
       exit_value_(EXIT_SUCCESS) {
 
     // The pid_file_dir can be overridden via environment variable
--- a/src/lib/process/Makefile.am
+++ b/src/lib/process/Makefile.am
@@ -1,8 +1,6 @@
 SUBDIRS = . testutils tests
-# DATA_DIR is the directory where to put PID files.
-dhcp_data_dir = @runstatedir@/@PACKAGE@
 AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
-AM_CPPFLAGS += -DDATA_DIR="\"$(dhcp_data_dir)\""
+AM_CPPFLAGS += -DKEA_PIDFILE_DIR="\"$(runstatedir)/$(PACKAGE_NAME)\""
 
 AM_CPPFLAGS += $(BOOST_INCLUDES)
 AM_CXXFLAGS  = $(KEA_CXXFLAGS)