Parcourir la source

[3422] Created a dummy script which will start kea.

Marcin Siodelski il y a 11 ans
Parent
commit
1435e3bfdf
4 fichiers modifiés avec 47 ajouts et 0 suppressions
  1. 3 0
      configure.ac
  2. 6 0
      src/bin/keactrl/Makefile.am
  3. 7 0
      src/bin/keactrl/README
  4. 31 0
      src/bin/keactrl/keactrl.in

+ 3 - 0
configure.ac

@@ -1456,6 +1456,8 @@ AC_CONFIG_FILES([compatcheck/Makefile
                  src/bin/dhcp6/tests/marker_file.h
                  src/bin/dhcp6/tests/marker_file.h
                  src/bin/dhcp6/tests/test_data_files_config.h
                  src/bin/dhcp6/tests/test_data_files_config.h
                  src/bin/dhcp6/tests/test_libraries.h
                  src/bin/dhcp6/tests/test_libraries.h
+                 src/bin/keactrl/keactrl
+                 src/bin/keactrl/Makefile
                  src/bin/Makefile
                  src/bin/Makefile
                  src/bin/msgq/Makefile
                  src/bin/msgq/Makefile
                  src/bin/msgq/msgq.py
                  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/bindctl/tests/bindctl_test
            chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
            chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
            chmod +x src/bin/cmdctl/tests/cmdctl_test
            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/msgq/run_msgq.sh
            chmod +x src/bin/sysinfo/run_sysinfo.sh
            chmod +x src/bin/sysinfo/run_sysinfo.sh
            chmod +x src/bin/usermgr/run_b10-cmdctl-usermgr.sh
            chmod +x src/bin/usermgr/run_b10-cmdctl-usermgr.sh

+ 6 - 0
src/bin/keactrl/Makefile.am

@@ -0,0 +1,6 @@
+SUBDIRS = .
+
+sbin_SCRIPTS = keactrl
+
+EXTRA_DIST = keactrl.in
+

+ 7 - 0
src/bin/keactrl/README

@@ -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.

+ 31 - 0
src/bin/keactrl/keactrl.in

@@ -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"
+