Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
85c5b01d
Commit
85c5b01d
authored
May 31, 2019
by
Francis Dupont
Browse files
[538-kea-should-not-store-anything-in-var-kea-lsb-violation] Introduced runstatedir for pid files
parent
a445d329
Changes
11
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
85c5b01d
...
...
@@ -1527,6 +1527,13 @@ AM_COND_IF([HAVE_OPTRESET], [AC_DEFINE([HAVE_OPTRESET], [1], [Check for optreset
AC_DEFINE([CONFIG_H_WAS_INCLUDED], [1], [config.h inclusion marker])
# Autoconf 2.70 has runstatedir but is not yet released.
if test "x$runstatedir" = "x"; then
AC_ARG_VAR(runstatedir, [$localstatedir/run for autoconf < 2.70])
runstatedir="$localstatedir/run"
AC_SUBST(runstatedir)
fi
AC_CONFIG_FILES([Makefile
compatcheck/Makefile
doc/Makefile
...
...
doc/guide/ddns.xml
View file @
85c5b01d
...
...
@@ -174,12 +174,12 @@ strings <userinput>path</userinput>/kea-dhcp-ddns | sed -n 's/;;;; //p'
<para>
During startup the server will attempt to create a PID file of the
form: [
local
statedir]/[conf name].kea-dhcp-ddns.pid
form: [
run
statedir]/[conf name].kea-dhcp-ddns.pid
where:
<itemizedlist>
<listitem>
<simpara><command>
local
statedir
</command>
: The value as passed into the
build configure script; it defaults to "/usr/local/var". Note
<simpara><command>
run
statedir
</command>
: The value as passed into the
build configure script; it defaults to "/usr/local/var
/run
". Note
that this value may be overridden at runtime by setting the environment
variable KEA_PIDFILE_DIR. This is intended primarily for testing purposes.
</simpara>
...
...
doc/guide/dhcp4-srv.xml
View file @
85c5b01d
...
...
@@ -96,11 +96,11 @@
<para>
During startup, the server will attempt to create a PID file of the
form: [
local
statedir]/[conf name].kea-dhcp4.pid where:
form: [
run
statedir]/[conf name].kea-dhcp4.pid where:
<itemizedlist>
<listitem>
<simpara><command>
local
statedir
</command>
: The value as passed into the
build configure script; it defaults to "/usr/local/var". Note
<simpara><command>
run
statedir
</command>
: The value as passed into the
build configure script; it defaults to "/usr/local/var
/run
". Note
that this value may be overridden at runtime by setting the environment
variable KEA_PIDFILE_DIR, although this is intended primarily for testing purposes.
</simpara>
...
...
doc/guide/dhcp6-srv.xml
View file @
85c5b01d
...
...
@@ -96,11 +96,11 @@
<para>
During startup, the server will attempt to create a PID file of the
form:
local
statedir]/[conf name].kea-dhcp6.pid where:
form:
[run
statedir]/[conf name].kea-dhcp6.pid where:
<itemizedlist>
<listitem>
<simpara><command>
local
statedir
</command>
: The value as passed into the
build configure script; it defaults to "/usr/local/var". Note
<simpara><command>
run
statedir
</command>
: The value as passed into the
build configure script; it defaults to "/usr/local/var
/run
". Note
that this value may be overridden at runtime by setting the environment
variable KEA_PIDFILE_DIR, although this is intended primarily for testing purposes.
</simpara>
...
...
src/bin/keactrl/kea-dhcp4.conf.pre
View file @
85c5b01d
...
...
@@ -252,7 +252,7 @@
// // of all devices serviced by Kea, including their identifiers
// // (like MAC address), their location in the network, times
// // when they were active etc.
// "library": "@l
ocalstate
dir@/kea/libdhcp_legal_log.so"
// "library": "@l
ib
dir@/kea/
hooks/
libdhcp_legal_log.so"
// "parameters": {
// "path": "/var/kea/var",
// "base-name": "kea-forensic4"
...
...
@@ -269,7 +269,7 @@
// // of specific options or perhaps even a combination of several
// // options and fields to uniquely identify a client. Those scenarios
// // are addressed by the Flexible Identifiers hook application.
// "library": "@l
ocalstate
dir@/kea/libdhcp_flex_id.so",
// "library": "@l
ib
dir@/kea/
hooks/
libdhcp_flex_id.so",
// "parameters": {
// "identifier-expression": "substring(relay6[0].option[18],0,8)"
// }
...
...
src/bin/keactrl/keactrl.in
View file @
85c5b01d
...
...
@@ -99,9 +99,9 @@ get_pid_from_file() {
local
conf_name
conf_name
=
$(
basename
--
"
${
kea_config_file
}
"
|
cut
-f1
-d
'.'
)
# Default the directory to --localstatedir
# Default the directory to --localstatedir
/ run
local
pid_file_dir
pid_file_dir
=
@
local
statedir@/@PACKAGE@
pid_file_dir
=
@
run
statedir@/@PACKAGE@
# Use directory override if set (primarily for testing only)
if
[
-n
"
$KEA_PIDFILE_DIR
"
]
;
then
...
...
@@ -333,7 +333,7 @@ run_conditional() {
# to the default file.
if
[
-z
"
${
KEA_LOGGER_DESTINATION
}
"
]
;
then
prefix
=
@prefix@
export
KEA_LOGGER_DESTINATION
=
@localstatedir@/
@PACKAGE@
/kea.log
export
KEA_LOGGER_DESTINATION
=
@localstatedir@/
log
/kea.log
fi
command
=
${
1
}
...
...
src/lib/process/Makefile.am
View file @
85c5b01d
SUBDIRS
=
.
testutils tests
dhcp_data_dir
=
@
local
statedir@/@PACKAGE@
dhcp_data_dir
=
@
run
statedir@/@PACKAGE@
AM_CPPFLAGS
=
-I
$(top_builddir)
/src/lib
-I
$(top_srcdir)
/src/lib
AM_CPPFLAGS
+=
-DDATA_DIR
=
"
\"
$(dhcp_data_dir)
\"
"
...
...
src/lib/process/daemon.h
View file @
85c5b01d
...
...
@@ -268,7 +268,7 @@ private:
std
::
string
proc_name_
;
/// @brief Pointer to the directory where PID file(s) are written
/// It defaults to --localstatedir
/// It defaults to --localstatedir
/ run
std
::
string
pid_file_dir_
;
/// @brief Pointer to the PID file for this process
...
...
src/lib/process/process_messages.mes
View file @
85c5b01d
...
...
@@ -107,9 +107,9 @@ This is an error message that occurs when the server is unable to create
its PID file. The log message should contain details sufficient to
determine the underlying cause. The most likely culprits are that
some portion of the pathname does not exist or a permissions issue. The
default path is determined by --localstatedir
configure parameter but
may be overridden by setting environment variable,
KEA_PIDFILE_DIR. The
first argument is the process name.
default path is determined by --localstatedir
or --runstatedir configure
parameters but
may be overridden by setting environment variable,
KEA_PIDFILE_DIR. The
first argument is the process name.
% DCTL_PROCESS_FAILED %1 application execution failed: %2
The controller has encountered a fatal error while running the
...
...
src/lib/process/tests/Makefile.am
View file @
85c5b01d
SUBDIRS
=
.
dhcp_data_dir
=
@
local
statedir@/@PACKAGE@
dhcp_data_dir
=
@
run
statedir@/@PACKAGE@
AM_CPPFLAGS
=
-I
$(top_builddir)
/src/lib
-I
$(top_srcdir)
/src/lib
AM_CPPFLAGS
+=
$(BOOST_INCLUDES)
AM_CPPFLAGS
+=
-DTEST_DATA_BUILDDIR
=
\"
$(abs_top_builddir)
/src/lib/process/tests
\"
...
...
src/lib/testutils/dhcp_test_lib.sh.in
View file @
85c5b01d
...
...
@@ -257,9 +257,9 @@ set_logger() {
export KEA_LOGGER_DESTINATION=${LOG_FILE}
}
# PID file path is by default <kea-install-dir>/var/kea, but can be
# PID file path is by default <kea-install-dir>/var/
run/
kea, but can be
# overridden by the environmental variable.
PID_FILE_PATH=@
local
statedir@/@PACKAGE@/
PID_FILE_PATH=@
run
statedir@/@PACKAGE@/
if [ ! -z ${KEA_PIDFILE_DIR} ]; then
PID_FILE_PATH="${KEA_PIDFILE_DIR}"
fi
...
...
Tomek Mrugalski
🛰
@tomek
mentioned in commit
f2b74cd9
·
Jul 18, 2019
mentioned in commit
f2b74cd9
mentioned in commit f2b74cd913519af640593a2d25a4410a2724dc91
Toggle commit list
Tomek Mrugalski
🛰
@tomek
mentioned in commit
9b485e70
·
Jul 19, 2019
mentioned in commit
9b485e70
mentioned in commit 9b485e7004c48516cb4ddde3ccaf5cf11cddcc19
Toggle commit list
Tomek Mrugalski
🛰
@tomek
mentioned in commit
6aca000b
·
Jul 30, 2019
mentioned in commit
6aca000b
mentioned in commit 6aca000be3c7eef5380d2e96fcedc1c07e3da194
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment