]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Replace keactrl.conf during installation.
authorMarcin Siodelski <marcin@isc.org>
Wed, 25 Oct 2017 12:15:11 +0000 (14:15 +0200)
committerMarcin Siodelski <marcin@isc.org>
Wed, 25 Oct 2017 12:16:11 +0000 (14:16 +0200)
We have updated keactrl.conf in Kea 1.3.0 release and thus its new
version must be always installed. The old version is backed up.

This change was okayed on jabber.

src/bin/keactrl/Makefile.am

index 6754691df8c3385339a0d9df784803d4e58c3dbb..9eb3da9f42824418957bb321f958b57ddfed57d2 100644 (file)
@@ -52,12 +52,24 @@ kea-ctrl-agent.conf: kea-ctrl-agent.conf.pre
 
 if INSTALL_CONFIGURATIONS
 
+# Since Kea 1.3.0 release we have 4 different Kea configuration files
+# instead of one, i.e. kea-dhcp4.conf, kea-dhcp6.conf, kea-dhcp-ddns.conf
+# and kea-ctrl-agent.conf. To facilitate the use of these new files
+# the keactrl.conf has been updated in Kea 1.3.0 release. Therefore,
+# we install new version of thea keactrl.conf file unconditionally.
+# To preserve any user modifications to the old version of the file,
+# this old file is backed up as keactrl.conf.bak.
 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 ;  \
+               if test -f $(DESTDIR)$(sysconfdir)/@PACKAGE@/$$f && \
+                  test $$f = "keactrl.conf"; then \
+                       mv $(DESTDIR)$(sysconfdir)/@PACKAGE@/$$f \
+                          $(DESTDIR)$(sysconfdir)/@PACKAGE@/$$f.bak; \
+               fi; \
+               if test ! -f $(DESTDIR)$(sysconfdir)/@PACKAGE@/$$f; then \
+                       ${INSTALL_DATA} $$f $(DESTDIR)$(sysconfdir)/@PACKAGE@/; \
+               fi; \
        done
 
 endif