summaryrefslogtreecommitdiff
path: root/community/kea/configs-fix-paths.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2019-12-15 18:06:55 +0100
committerJakub Jirutka <jakub@jirutka.cz>2019-12-15 18:07:32 +0100
commiteeb24c76fdea1650a0c6266641890db101b8c3e4 (patch)
tree563ad6e05057f932d765d28916cc139433655b1a /community/kea/configs-fix-paths.patch
parent9b3c4f74678ecc8a7e26869e3743e294077a3557 (diff)
downloadaports-eeb24c76fdea1650a0c6266641890db101b8c3e4.zip
community/kea: fix paths of control sockets
Diffstat (limited to 'community/kea/configs-fix-paths.patch')
-rw-r--r--community/kea/configs-fix-paths.patch116
1 files changed, 116 insertions, 0 deletions
diff --git a/community/kea/configs-fix-paths.patch b/community/kea/configs-fix-paths.patch
new file mode 100644
index 00000000000..f79855dad8e
--- /dev/null
+++ b/community/kea/configs-fix-paths.patch
@@ -0,0 +1,116 @@
+* We have to move logs from /var/log to /var/log/kea to allow running
+ under unprivileged user.
+* /tmp is not a good location for control sockets, move them to /run/kea.
+
+--- a/src/bin/keactrl/kea-ctrl-agent.conf.pre
++++ b/src/bin/keactrl/kea-ctrl-agent.conf.pre
+@@ -26,15 +26,15 @@
+ "control-sockets": {
+ "dhcp4": {
+ "socket-type": "unix",
+- "socket-name": "/tmp/kea4-ctrl-socket"
++ "socket-name": "/run/kea/kea-dhcp4-ctrl.sock"
+ },
+ "dhcp6": {
+ "socket-type": "unix",
+- "socket-name": "/tmp/kea6-ctrl-socket"
++ "socket-name": "/run/kea/kea-dhcp6-ctrl.sock"
+ },
+ "d2": {
+ "socket-type": "unix",
+- "socket-name": "/tmp/kea-ddns-ctrl-socket"
++ "socket-name": "/run/kea/kea-dhcp-ddns-ctrl.sock"
+ }
+ },
+
+@@ -67,7 +67,7 @@
+ // - syslog (logs to syslog)
+ // - syslog:name (logs to syslog using specified name)
+ // Any other value is considered a name of a time
+- "output": "@localstatedir@/log/kea-ctrl-agent.log"
++ "output": "@localstatedir@/log/kea/kea-ctrl-agent.log"
+
+ // Shorter log pattern suitable for use with systemd,
+ // avoids redundant information
+--- a/src/bin/keactrl/kea-dhcp-ddns.conf.pre
++++ b/src/bin/keactrl/kea-dhcp-ddns.conf.pre
+@@ -23,7 +23,7 @@
+ "port": 53001,
+ "control-socket": {
+ "socket-type": "unix",
+- "socket-name": "/tmp/ddns-ctrl-socket"
++ "socket-name": "/run/kea/kea-dhcp-ddns-ctrl.sock"
+ },
+ "tsig-keys": [],
+ "forward-ddns" : {},
+@@ -44,7 +44,7 @@
+ // - syslog (logs to syslog)
+ // - syslog:name (logs to syslog using specified name)
+ // Any other value is considered a name of a time
+- "output": "@localstatedir@/log/kea-ddns.log"
++ "output": "@localstatedir@/log/kea/kea-ddns.log"
+
+ // Shorter log pattern suitable for use with systemd,
+ // avoids redundant information
+--- a/src/bin/keactrl/kea-dhcp4.conf.pre
++++ b/src/bin/keactrl/kea-dhcp4.conf.pre
+@@ -49,7 +49,7 @@
+ // more. For detailed description, see Sections 8.8, 16 and 15.
+ "control-socket": {
+ "socket-type": "unix",
+- "socket-name": "/tmp/kea4-ctrl-socket"
++ "socket-name": "/run/kea/kea-dhcp4-ctrl.sock"
+ },
+
+ // Use Memfile lease database backend to store leases in a CSV file.
+@@ -428,7 +428,7 @@
+ // - syslog (logs to syslog)
+ // - syslog:name (logs to syslog using specified name)
+ // Any other value is considered a name of a time
+- "output": "@localstatedir@/log/kea-dhcp4.log"
++ "output": "@localstatedir@/log/kea/kea-dhcp4.log"
+
+ // Shorter log pattern suitable for use with systemd,
+ // avoids redundant information
+--- a/src/bin/keactrl/kea-dhcp6.conf.pre
++++ b/src/bin/keactrl/kea-dhcp6.conf.pre
+@@ -43,7 +43,7 @@
+ // description, see Sections 9.12, 16 and 15.
+ "control-socket": {
+ "socket-type": "unix",
+- "socket-name": "/tmp/kea6-ctrl-socket"
++ "socket-name": "/run/kea/kea-dhcp6-ctrl.sock"
+ },
+
+ // Use Memfile lease database backend to store leases in a CSV file.
+@@ -353,7 +353,7 @@
+ // - syslog (logs to syslog)
+ // - syslog:name (logs to syslog using specified name)
+ // Any other value is considered a name of a time
+- "output": "@localstatedir@/log/kea-dhcp6.log"
++ "output": "@localstatedir@/log/kea/kea-dhcp6.log"
+
+ // Shorter log pattern suitable for use with systemd,
+ // avoids redundant information
+--- a/src/bin/keactrl/kea-netconf.conf.pre
++++ b/src/bin/keactrl/kea-netconf.conf.pre
+@@ -69,7 +69,7 @@
+ // - syslog (logs to syslog)
+ // - syslog:name (logs to syslog using specified name)
+ // Any other value is considered a name of a time
+- "output": "@localstatedir@/log/kea-netconf.log"
++ "output": "@localstatedir@/log/kea/kea-netconf.log"
+
+ // Shorter log pattern suitable for use with systemd,
+ // avoids redundant information
+--- a/src/bin/keactrl/keactrl.in
++++ b/src/bin/keactrl/keactrl.in
+@@ -333,7 +333,7 @@
+ # to the default file.
+ if [ -z "${KEA_LOGGER_DESTINATION}" ]; then
+ prefix=@prefix@
+- export KEA_LOGGER_DESTINATION=@localstatedir@/log/kea.log
++ export KEA_LOGGER_DESTINATION=@localstatedir@/log/kea/kea.log
+ fi
+
+ command=${1}