From: JINMEI Tatuya Date: Fri, 30 Mar 2012 07:45:47 +0000 (-0700) Subject: [324] make sure dbutil is run only when the DB file exists. X-Git-Tag: trac2351_base~226^2~116^2~58^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9aa4dd78f5cc00acb5ecc4fdc5ba1beb423aa40d;p=thirdparty%2Fkea.git [324] make sure dbutil is run only when the DB file exists. otherwise make install incorrectly fails for a clean install. --- diff --git a/compatcheck/Makefile.am b/compatcheck/Makefile.am index 38a1555097..15ef017008 100644 --- a/compatcheck/Makefile.am +++ b/compatcheck/Makefile.am @@ -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