From: Marcin Siodelski Date: Wed, 25 Oct 2017 12:15:11 +0000 (+0200) Subject: [master] Replace keactrl.conf during installation. X-Git-Tag: Kea-1.3.0~1^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ff9b784526eb58bfd78bc345132d8c7268eb94d;p=thirdparty%2Fkea.git [master] Replace keactrl.conf during installation. 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. --- diff --git a/src/bin/keactrl/Makefile.am b/src/bin/keactrl/Makefile.am index 6754691df8..9eb3da9f42 100644 --- a/src/bin/keactrl/Makefile.am +++ b/src/bin/keactrl/Makefile.am @@ -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