]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3422] Created a dummy script which will start kea.
authorMarcin Siodelski <marcin@isc.org>
Wed, 4 Jun 2014 13:55:05 +0000 (15:55 +0200)
committerMarcin Siodelski <marcin@isc.org>
Wed, 4 Jun 2014 13:55:05 +0000 (15:55 +0200)
configure.ac
src/bin/keactrl/Makefile.am [new file with mode: 0644]
src/bin/keactrl/README [new file with mode: 0644]
src/bin/keactrl/keactrl.in [new file with mode: 0644]

index 8e6680bb0be2d90c220adbf559b7bc1c67df094e..97b1993cc4fe5884aae9dee96321d69200e42786 100644 (file)
@@ -1456,6 +1456,8 @@ AC_CONFIG_FILES([compatcheck/Makefile
                  src/bin/dhcp6/tests/marker_file.h
                  src/bin/dhcp6/tests/test_data_files_config.h
                  src/bin/dhcp6/tests/test_libraries.h
+                 src/bin/keactrl/keactrl
+                 src/bin/keactrl/Makefile
                  src/bin/Makefile
                  src/bin/msgq/Makefile
                  src/bin/msgq/msgq.py
@@ -1587,6 +1589,7 @@ AC_CONFIG_FILES([compatcheck/Makefile
            chmod +x src/bin/bindctl/tests/bindctl_test
            chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
            chmod +x src/bin/cmdctl/tests/cmdctl_test
+           chmod +x src/bin/keactrl/keactrl
            chmod +x src/bin/msgq/run_msgq.sh
            chmod +x src/bin/sysinfo/run_sysinfo.sh
            chmod +x src/bin/usermgr/run_b10-cmdctl-usermgr.sh
diff --git a/src/bin/keactrl/Makefile.am b/src/bin/keactrl/Makefile.am
new file mode 100644 (file)
index 0000000..90942cc
--- /dev/null
@@ -0,0 +1,6 @@
+SUBDIRS = .
+
+sbin_SCRIPTS = keactrl
+
+EXTRA_DIST = keactrl.in
+
diff --git a/src/bin/keactrl/README b/src/bin/keactrl/README
new file mode 100644 (file)
index 0000000..93c3931
--- /dev/null
@@ -0,0 +1,7 @@
+This directory contains the source for the "keactrl" script which is used to
+start, stop and reconfigure Kea processes:
+- DHCPv4 server,
+- DHCPv6 server,
+- DDNS module (a.k.a D2)
+
+The "tests" directory contains unit tests for the script.
diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in
new file mode 100644 (file)
index 0000000..52ac44d
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# This is keactrl script responsible for starting up Kea processes.
+# This script is used to run Kea from installation directory,
+# as well as for running tests.
+
+# Set locations of the Kea binaries.
+dhcpv4_srv=
+dhcpv6_srv=
+dhcp_ddns=
+
+# The environment variable is set when the script is ran from the
+# tests. If not set, the Kea installation directory is used.
+if test -n "${KEACTRL_BUILD_DIR}"; then
+    dhcpv4_srv=${KEACTRL_BUILD_DIR}/src/bin/dhcp4/b10-dhcp4
+    dhcpv6_srv=${KEACTRL_BUILD_DIR}/src/bin/dhcp6/b10-dhcp6
+    dhcp_ddns=${KEACTRL_BUILD_DIR}/src/bin/d2/b10-dhcp-ddns
+else
+    prefix=@prefix@
+    exec_prefix=@exec_prefix@
+    dhcpv4_srv=@libexecdir@/@PACKAGE@/b10-dhcp4
+    dhcpv6_srv=@libexecdir@/@PACKAGE@/dhcp6/b10-dhcp6
+    dhcp_ddns=@libexecdir@/@PACKAGE@/b10-dhcp-ddns
+fi
+
+# Currently, it doesn't do anything useful. Just prints the locations
+# of the binaries.
+printf "${dhcpv4_srv}\n"
+printf "${dhcpv6_srv}\n"
+printf "${dhcp_ddns}\n"
+