From 32ee0a897699b71c29f7706cd4676bd4766d1dd8 Mon Sep 17 00:00:00 2001 From: Knniggett Date: Sat, 5 Oct 2013 18:38:57 -0500 Subject: [PATCH] create ZM_PATH_DATA and point zmupdate to ZM_PATH_DATA/db --- scripts/zmupdate.pl.in | 4 ++-- zm.conf.in | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/zmupdate.pl.in b/scripts/zmupdate.pl.in index ba3b808d8..a113aade4 100644 --- a/scripts/zmupdate.pl.in +++ b/scripts/zmupdate.pl.in @@ -429,7 +429,7 @@ if ( $version ) } else { - $command .= ZM_PATH_BUILD."/db"; + $command .= ZM_PATH_DATA."/db"; } $command .= "/zm_update-".$version.".sql"; @@ -1030,7 +1030,7 @@ if ( $version ) if ( $version ge '1.26.0' ) { my @files; - $updateDir = ZM_PATH_BUILD."/db" if ! $updateDir; + $updateDir = ZM_PATH_DATA."/db" if ! $updateDir; opendir( my $dh, $updateDir ) || die "Can't open updateDir $!"; @files = sort grep { (!/^\./) && /^zm_update\-[\d\.]+\.sql$/ && -f "$updateDir/$_" } readdir($dh); closedir $dh; diff --git a/zm.conf.in b/zm.conf.in index 6a95e1b76..8d8d08632 100644 --- a/zm.conf.in +++ b/zm.conf.in @@ -15,6 +15,9 @@ ZM_VERSION=@VERSION@ # Path to build directory, used mostly for finding DB upgrade scripts ZM_PATH_BUILD=@PATH_BUILD@ +# Path to installed data directory, used mostly for finding DB upgrade scripts +ZM_PATH_DATA=@PKGDATADIR@ + # Build time, used to record when to trigger various checks ZM_TIME_BUILD=@TIME_BUILD@