]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[324] make sure dbutil is run only when the DB file exists.
authorJINMEI Tatuya <jinmei@isc.org>
Fri, 30 Mar 2012 07:45:47 +0000 (00:45 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Fri, 30 Mar 2012 07:45:47 +0000 (00:45 -0700)
otherwise make install incorrectly fails for a clean install.

compatcheck/Makefile.am

index 38a1555097d8dbf6db92000a20451277a62037d7..15ef0170084b1199cfa314b48121bc6dd86e47cd 100644 (file)
@@ -2,8 +2,11 @@
 # This is to be considered a short term hack and is expected to be removed
 # in a near future version.
 install-data-local:
-       $(SHELL) $(top_builddir)/src/bin/dbutil/run_dbutil.sh --check \
-       $(localstatedir)/$(PACKAGE)/zone.sqlite3 || \
-       (echo "\nSQLite3 DB file schema version is old.  Please run: " \
-       "$(abs_top_builddir)/src/bin/dbutil/run_dbutil.sh --upgrade " \
-       "$(localstatedir)/$(PACKAGE)/zone.sqlite3";  exit 1)
+       if test -e $(localstatedir)/$(PACKAGE)/zone.sqlite3; then \
+               $(SHELL) $(top_builddir)/src/bin/dbutil/run_dbutil.sh --check \
+               $(localstatedir)/$(PACKAGE)/zone.sqlite3 || \
+               (echo "\nSQLite3 DB file schema version is old.  " \
+               "Please run: " \
+               "$(abs_top_builddir)/src/bin/dbutil/run_dbutil.sh --upgrade " \
+               "$(localstatedir)/$(PACKAGE)/zone.sqlite3";  exit 1) \
+       fi