This repository was archived by the owner on Apr 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +25
-1
lines changed
Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ ACLOCAL_AMFLAGS = -I m4
2121
2222SUBDIRS = src po
2323
24+ pkgsysconfdir = $(sysconfdir ) /@PACKAGE@
2425libstatedir = @localstatedir@/lib/@PACKAGE@
2526
2627dist_libstate_DATA = \
Original file line number Diff line number Diff line change @@ -2896,6 +2896,11 @@ <h2><a name="config_files"></a> The Configuration Files </h2>
28962896 by --localstatedir=DIR during the configure step of installation. If this was
28972897 not defined, it will default to /var/lib/motionplus or /usr/local/var/lib/motionplus
28982898 depending upon your system</ li >
2899+ < li > The directory defined by --sysconfdir=DIR during the configure step of installation.
2900+ If this was not defined, it will default to /etc/motionplus or /usr/local/etc/motionplus
2901+ depending upon your system. Please note that the use of this directory for the configuration
2902+ files is deprecated. Some significant functionality of Motionplus will not be available
2903+ if the configuration files are in this directory.</ li >
28992904 </ ol >
29002905 < p > </ p >
29012906 The motionplus.conf file specifies parameters for the entire MotionPlus application and defaults for
Original file line number Diff line number Diff line change 1717# */
1818
1919
20- AM_CPPFLAGS = -Dconfigdir=\"$(localstatedir ) /lib/@PACKAGE@\" -DLOCALEDIR=\"$(localedir ) \"
20+ AM_CPPFLAGS = \
21+ -Dconfigdir=\"$(localstatedir ) /lib/@PACKAGE@\" \
22+ -Dsysconfdir=\"$(sysconfdir ) /motionplus\" \
23+ -DLOCALEDIR=\"$(localedir ) \"
2124
2225LDADD = $(LIBINTL )
2326
Original file line number Diff line number Diff line change @@ -4310,6 +4310,21 @@ void cls_config::init()
43104310 }
43114311 }
43124312
4313+ if (filename == " " ) {
4314+ filename = std::string ( sysconfdir ) + std::string (" /motionplus.conf" );
4315+ if (stat (filename.c_str (), &statbuf) != 0 ) {
4316+ filename = " " ;
4317+ }
4318+ if (filename != " " ) {
4319+ MOTPLS_LOG (WRN, TYPE_ALL, SHOW_ERRNO
4320+ ,_ (" The configuration file location '%s' is deprecated." )
4321+ , sysconfdir );
4322+ MOTPLS_LOG (WRN, TYPE_ALL, SHOW_ERRNO
4323+ ,_ (" The new default configuration file location is '%s'" )
4324+ , configdir );
4325+ }
4326+ }
4327+
43134328 if (filename == " " ) {
43144329 MOTPLS_LOG (ALR, TYPE_ALL, SHOW_ERRNO
43154330 ,_ (" Could not open configuration file" ));
You can’t perform that action at this time.
0 commit comments