]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3422] keactrl and related configuration files are now installed.
authorMarcin Siodelski <marcin@isc.org>
Thu, 12 Jun 2014 12:25:39 +0000 (14:25 +0200)
committerMarcin Siodelski <marcin@isc.org>
Thu, 12 Jun 2014 12:25:39 +0000 (14:25 +0200)
configure.ac
src/bin/Makefile.am
src/bin/keactrl/.gitignore
src/bin/keactrl/Makefile.am
src/bin/keactrl/keactrl.conf.in [new file with mode: 0644]
src/bin/keactrl/keactrl.in

index 6dfc171eab694222ed7986e9f7c6cc62068f2d33..bd3b4fc13a7857ea4538c9f22028791b407a94a8 100644 (file)
@@ -1457,6 +1457,7 @@ AC_CONFIG_FILES([compatcheck/Makefile
                  src/bin/dhcp6/tests/test_data_files_config.h
                  src/bin/dhcp6/tests/test_libraries.h
                  src/bin/keactrl/keactrl
+                 src/bin/keactrl/keactrl.conf
                  src/bin/keactrl/Makefile
                  src/bin/keactrl/tests/keactrl_tests.sh
                  src/bin/keactrl/tests/Makefile
index 121d43aad19b5c53e2d4dd915394560de55bcf66..1f43434618dce0ea23ecd601f5b1f6d31586e0ed 100644 (file)
@@ -1,6 +1,6 @@
 # The following build order must be maintained.
 SUBDIRS = bind10 bindctl cfgmgr msgq cmdctl \
        usermgr stats tests  sockcreator dhcp4 dhcp6 \
-       d2 sysinfo
+       d2 sysinfo keactrl
 
 check-recursive: all-recursive
index cb2e5794bbbd7a729fcc2e50c3b1f40df642a32b..052400cae4e458d13fe30151ab94cf205e2780c6 100644 (file)
@@ -1 +1,2 @@
 keactrl
+keactrl.conf
index d8f15911f73ca6806cc8566f5a95886e8726c336..627da00149340e57676e710e4815cd6d24060208 100644 (file)
@@ -1,7 +1,20 @@
 SUBDIRS = . tests
 
+# Install keactrl in sbin and the keactrl.conf required by the keactrl
+# in etc. keactrl will look for its configuration file in the etc folder.
+# If the default location needs to be changed the it may be achieved by
+# setting KEACTRL_CONF environment variable.
 sbin_SCRIPTS  = keactrl
-CLEANFILES = keactrl
+CONFIGFILES = keactrl.conf
 
-EXTRA_DIST = keactrl.in
+DISTCLEANFILES = keactrl keactrl.conf
+EXTRA_DIST = keactrl.in keactrl.conf.in
+
+install-data-local:
+       $(mkinstalldirs) $(DESTDIR)/@sysconfdir@/@PACKAGE@
+       for f in $(CONFIGFILES) ; do    \
+         if test ! -f $(DESTDIR)$(sysconfdir)/@PACKAGE@/$$f; then      \
+           ${INSTALL_DATA} $$f $(DESTDIR)$(sysconfdir)/@PACKAGE@/ ;    \
+         fi ;  \
+       done
 
diff --git a/src/bin/keactrl/keactrl.conf.in b/src/bin/keactrl/keactrl.conf.in
new file mode 100644 (file)
index 0000000..c878742
--- /dev/null
@@ -0,0 +1,18 @@
+# This is a configuration file for keactrl script which controls
+# the startup, shutdown, reconfiguration and gathering the status
+# of the Kea's processes.
+
+# prefix holds the location where the Kea is installed.
+prefix=@prefix@
+
+# Location of Kea configuration file.
+kea_config_file=@sysconfdir@/@PACKAGE@/kea.conf
+
+# Start DHCPv4 server?
+kea4=yes
+
+# Start DHCPv6 server?
+kea6=yes
+
+# Be verbose?
+kea_verbose=no
index a756bcda29408e3d5d03c5b5c7e9c08c59ecf04e..520ffef856f1dcfc4b48297f90781d16bc765ae0 100644 (file)
@@ -133,10 +133,10 @@ if test -n "${KEACTRL_BUILD_DIR}"; then
 else
     prefix=@prefix@
     exec_prefix=@exec_prefix@
-    dhcpv4_srv=@libexecdir@/@PACKAGE@/dhcp4/b10-dhcp4
-    dhcpv6_srv=@libexecdir@/@PACKAGE@/dhcp6/b10-dhcp6
+    dhcpv4_srv=@libexecdir@/@PACKAGE@/b10-dhcp4
+    dhcpv6_srv=@libexecdir@/@PACKAGE@/b10-dhcp6
     dhcp_ddns=@libexecdir@/@PACKAGE@/b10-dhcp-ddns
-    keactrl_conf=@etcdir@/@PACKAGE@/keactrl.conf
+    keactrl_conf=@sysconfdir@/@PACKAGE@/keactrl.conf
 fi
 
 # KEACTRL_CONF environment variable may hold a location of the keactrl
@@ -148,7 +148,7 @@ fi
 
 # Check if the file exists. If it doesn't, it is a fatal error.
 if [ ! -f ${keactrl_conf} ]; then
-    log_error "keactrl configuration file doesn't exist."
+    log_error "keactrl configuration file doesn't exist in ${keactrl_conf}."
     exit 1
 fi
 
@@ -160,6 +160,9 @@ fi
 if [ -z ${kea_config_file} ]; then
     log_error "Configuration file for Kea not specified."
     exit 1
+elif [ ! -f ${kea_config_file} ]; then
+    log_error "Configuration file for Kea does not exist: ${kea_config_file}."
+    exit 1
 fi
 
 # kea4 and kea6 (=yes) indicate if we should start DHCPv4 and DHCPv6 server