]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3427] path_replacer.sh added
authorTomek Mrugalski <tomasz@isc.org>
Fri, 8 Aug 2014 10:57:20 +0000 (12:57 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 8 Aug 2014 10:57:20 +0000 (12:57 +0200)
configure.ac
src/bin/keactrl/Makefile.am
tools/path_replacer.sh.in [new file with mode: 0644]

index d166e3d03edda222faf1c00f1b491529512a430c..3a2207486b064c6328555e5c29e3bd03f9dc3059 100644 (file)
@@ -1383,7 +1383,6 @@ 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/kea.conf
                  src/bin/keactrl/keactrl.conf
                  src/bin/keactrl/Makefile
                  src/bin/keactrl/tests/keactrl_tests.sh
@@ -1454,6 +1453,7 @@ AC_CONFIG_FILES([compatcheck/Makefile
                  src/lib/util/threads/tests/Makefile
                  src/lib/util/unittests/Makefile
                  src/Makefile
+                 tools/path_replacer.sh
                  tests/Makefile
                  tests/tools/Makefile
                  tests/tools/perfdhcp/Makefile
@@ -1474,6 +1474,7 @@ AC_CONFIG_FILES([compatcheck/Makefile
            chmod +x src/lib/log/tests/logger_lock_test.sh
            chmod +x src/lib/log/tests/severity_test.sh
            chmod +x src/lib/util/python/gen_wiredata.py
+           chmod +x tools/path_replacer.sh
 ])
 
 AC_OUTPUT
index 431b377632d4b2cf021f2f1d5940a6ad9e332cca..f9b30b4e236ff5451608357ed37cb380a2182234 100644 (file)
@@ -24,6 +24,9 @@ $(man_MANS):
 
 endif
 
+kea.conf: kea.conf.in
+       $(top_srcdir)/tools/path_replacer.sh $< $@
+
 if INSTALL_CONFIGURATIONS
 
 install-data-local:
diff --git a/tools/path_replacer.sh.in b/tools/path_replacer.sh.in
new file mode 100644 (file)
index 0000000..0ab9b11
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+#
+# This script replaces @prefix@ and @localstatedir@ variables with their
+# actual content. Usage:
+#
+# ./path_replacer.sh input-file.in output-file
+
+prefix=@prefix@
+sysconfdir=@sysconfdir@
+localstatedir=@localstatedir@
+
+echo "Replacing \@localstatedir\@ with ${localstatedir}"
+
+echo "Input file: $1"
+echo "Output file: $2"
+
+sed -e "s+\@localstatedir\@+${localstatedir}+g; s+\@prefix@+${prefix}+g; s+\@sysconfdir@+${sysconfdir}+g" $1 > $2