Skip to content

Create ZM_PATH_DATA and point zmupdate to ZM_PATH_DATA/db#200

Merged
mastertheknife merged 3 commits intoZoneMinder:masterfrom
knight-of-ni:zm_path_data
Oct 6, 2013
Merged

Create ZM_PATH_DATA and point zmupdate to ZM_PATH_DATA/db#200
mastertheknife merged 3 commits intoZoneMinder:masterfrom
knight-of-ni:zm_path_data

Conversation

@knight-of-ni
Copy link
Member

Problem:
Previously, zmupdate.pl looked for the update sql scripts under ZM_PATH_BUILD/db. ZM_PATH_BUILD points to the folder the source files were built from. However, this folder does not exist on systems on which zoneminder was not built from source (e.g. deb, rpm, pkg, etc).

Solution:
Create a new ZM variable called ZM_PATH_DATA, which points to @PKGDATADIR@. Then modify zmupdate to look in ZM_PATH_DATA/db.

Couple of things to note:

  1. "make install" already copies the sql scripts into @PKGDATADIR@/db so no change was needed there.
  2. This solution works under all build scenarios: from source, from deb, from rpm, from pkg, etc.

Awaiting feedback.

@mastertheknife
Copy link
Contributor

This is a good pull request, it has clear and good description.
Personally i think its right. We want our scripts asking minimal amount of questions, and should be using zm.conf for this kind of stuff.
This is a small low risk pull request. It seems there are no objections, so there is no reason not to merge this.

mastertheknife added a commit that referenced this pull request Oct 6, 2013
Create ZM_PATH_DATA and point zmupdate to ZM_PATH_DATA/db
@mastertheknife mastertheknife merged commit a248bc9 into ZoneMinder:master Oct 6, 2013
@knight-of-ni
Copy link
Member Author

Thanks @mastertheknife

However, I do want to make sure @connortechnology sees this since he has been working in the same file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants