Changed all MaxScale.cnf code references to maxscale.cnf
This commit is contained in:
@ -63,6 +63,7 @@ configure_file(${CMAKE_SOURCE_DIR}/server/include/gwdirs.h.in ${CMAKE_BINARY_DIR
|
|||||||
configure_file(${CMAKE_SOURCE_DIR}/server/test/maxscale_test.h.in ${CMAKE_BINARY_DIR}/server/include/maxscale_test.h)
|
configure_file(${CMAKE_SOURCE_DIR}/server/test/maxscale_test.h.in ${CMAKE_BINARY_DIR}/server/include/maxscale_test.h)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/etc/postinst.in ${CMAKE_BINARY_DIR}/postinst)
|
configure_file(${CMAKE_SOURCE_DIR}/etc/postinst.in ${CMAKE_BINARY_DIR}/postinst)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/etc/postrm.in ${CMAKE_BINARY_DIR}/postrm)
|
configure_file(${CMAKE_SOURCE_DIR}/etc/postrm.in ${CMAKE_BINARY_DIR}/postrm)
|
||||||
|
configure_file(${CMAKE_SOURCE_DIR}/server/test/maxscale_test.cnf ${CMAKE_BINARY_DIR}/maxscale.cnf)
|
||||||
|
|
||||||
set(FLAGS "-Wall -Wno-unused-variable -Wno-unused-function -fPIC" CACHE STRING "Compilation flags")
|
set(FLAGS "-Wall -Wno-unused-variable -Wno-unused-function -fPIC" CACHE STRING "Compilation flags")
|
||||||
set(DEBUG_FLAGS "-ggdb -pthread -pipe -Wformat -fstack-protector --param=ssp-buffer-size=4" CACHE STRING "Debug compilation flags")
|
set(DEBUG_FLAGS "-ggdb -pthread -pipe -Wformat -fstack-protector --param=ssp-buffer-size=4" CACHE STRING "Debug compilation flags")
|
||||||
@ -152,9 +153,9 @@ ${CMAKE_SOURCE_DIR}/Documentation/Upgrading-To-MaxScale-1.1.0.md
|
|||||||
install(FILES ${CMAKE_BINARY_DIR}/Changelog.txt DESTINATION ${MAXSCALE_SHAREDIR})
|
install(FILES ${CMAKE_BINARY_DIR}/Changelog.txt DESTINATION ${MAXSCALE_SHAREDIR})
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/ReleaseNotes.txt DESTINATION ${MAXSCALE_SHAREDIR})
|
install(FILES ${CMAKE_BINARY_DIR}/ReleaseNotes.txt DESTINATION ${MAXSCALE_SHAREDIR})
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/UpgradingToMaxScale110.txt DESTINATION ${MAXSCALE_SHAREDIR})
|
install(FILES ${CMAKE_BINARY_DIR}/UpgradingToMaxScale110.txt DESTINATION ${MAXSCALE_SHAREDIR})
|
||||||
install(FILES server/MaxScale_template.cnf DESTINATION ${MAXSCALE_SHAREDIR})
|
install(FILES server/maxscale_template.cnf DESTINATION ${MAXSCALE_SHAREDIR})
|
||||||
install(FILES server/MaxScale_BinlogServer_template.cnf DESTINATION ${MAXSCALE_SHAREDIR})
|
install(FILES server/maxscale_binlogserver_template.cnf DESTINATION ${MAXSCALE_SHAREDIR})
|
||||||
install(FILES ${ERRMSG} DESTINATION ${MAXSCALE_SHAREDIR})
|
install(FILES ${ERRMSG} DESTINATION /usr/share/mysql/english/)
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/COPYRIGHT DESTINATION ${MAXSCALE_SHAREDIR})
|
install(FILES ${CMAKE_SOURCE_DIR}/COPYRIGHT DESTINATION ${MAXSCALE_SHAREDIR})
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/README DESTINATION ${MAXSCALE_SHAREDIR})
|
install(FILES ${CMAKE_SOURCE_DIR}/README DESTINATION ${MAXSCALE_SHAREDIR})
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ${MAXSCALE_SHAREDIR})
|
install(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ${MAXSCALE_SHAREDIR})
|
||||||
@ -245,7 +246,6 @@ add_custom_target(buildtestsx
|
|||||||
add_custom_target(testall
|
add_custom_target(testall
|
||||||
COMMAND ${CMAKE_COMMAND} -DDEPS_OK=Y -DBUILD_TESTS=Y -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR} -DWITH_SCRIPTS=N ${CMAKE_SOURCE_DIR}
|
COMMAND ${CMAKE_COMMAND} -DDEPS_OK=Y -DBUILD_TESTS=Y -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR} -DWITH_SCRIPTS=N ${CMAKE_SOURCE_DIR}
|
||||||
COMMAND make install
|
COMMAND make install
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/server/test/MaxScale_test.cnf ${CMAKE_BINARY_DIR}/etc/MaxScale.cnf
|
|
||||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/testall.cmake
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/testall.cmake
|
||||||
COMMENT "Running full test suite..." VERBATIM)
|
COMMENT "Running full test suite..." VERBATIM)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
execute_process(COMMAND /bin/sh -c "${CMAKE_BINARY_DIR}/bin/maxscale -c ${CMAKE_BINARY_DIR} &>/dev/null 2> /dev/null > /dev/null")
|
execute_process(COMMAND /bin/sh -c "${CMAKE_BINARY_DIR}/bin/maxscale -f ${CMAKE_BINARY_DIR}/etc/maxscale.cnf &>/dev/null 2> /dev/null > /dev/null")
|
||||||
execute_process(COMMAND make test RESULT_VARIABLE RVAL)
|
execute_process(COMMAND make test RESULT_VARIABLE RVAL)
|
||||||
execute_process(COMMAND killall maxscale)
|
execute_process(COMMAND killall maxscale)
|
||||||
if(NOT RVAL EQUAL 0)
|
if(NOT RVAL EQUAL 0)
|
||||||
|
@ -999,29 +999,25 @@ return_cnf_file_buf:
|
|||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"\nUsage : %s [-h] | [-d] [-c <home directory>] [-f <config file name>]\n\n"
|
"\nUsage : %s [OPTION]...\n\n"
|
||||||
" -d|--nodaemon enable running in terminal process (default:disabled)\n"
|
" -d, --nodaemon enable running in terminal process (default:disabled)\n"
|
||||||
" -c|--homedir=... relative|absolute MaxScale home directory\n"
|
" -f, --config=FILE relative|absolute pathname of MaxScale configuration file\n"
|
||||||
" -f|--config=... relative|absolute pathname of MaxScale configuration file\n"
|
" (default:/etc/maxscale.cnf)\n"
|
||||||
" (default: $MAXSCALE_HOME/etc/MaxScale.cnf)\n"
|
" -l, --log=[file|shm] log to file or shared memory (default: shm)\n"
|
||||||
" -l|--log=... log to file or shared memory\n"
|
" -L, --logdir=PATH path to log file directory\n"
|
||||||
" -lfile or -lshm - defaults to shared memory\n"
|
|
||||||
" -L|--logdir=... path to log file directory\n"
|
|
||||||
" (default: /var/log/maxscale)\n"
|
" (default: /var/log/maxscale)\n"
|
||||||
" -D|--datadir=... path to data directory\n"
|
" -D, --datadir=PATH path to data directory\n"
|
||||||
" (default: /usr/lib64/maxscale)\n"
|
" (default: /usr/lib64/maxscale)\n"
|
||||||
" -C|--configdir=... path to configuration file directory\n"
|
" -C, --configdir=PATH path to configuration file directory\n"
|
||||||
" (default: /etc/)\n"
|
" (default: /etc/)\n"
|
||||||
" -B|--libdir=... path to module directory\n"
|
" -B, --libdir=PATH path to module directory\n"
|
||||||
" (default: /usr/lib64/maxscale)\n"
|
" (default: /usr/lib64/maxscale)\n"
|
||||||
" -A|--cachedir=... path to cache directory\n"
|
" -A, --cachedir=PATH path to cache directory\n"
|
||||||
" (default: /var/cache/maxscale)\n"
|
" (default: /var/cache/maxscale)\n"
|
||||||
" -s|--syslog= log messages to syslog.\n"
|
" -s, --syslog=[yes|no] log messages to syslog (default:yes)\n"
|
||||||
" True or false - defaults to true\n"
|
" -S, --maxscalelog=[yes|no] log messages to MaxScale log (default: yes)\n"
|
||||||
" -S|--maxscalelog= log messages to MaxScale log.\n"
|
" -v, --version print version info and exit\n"
|
||||||
" True or false - defaults to true\n"
|
" -?, --help show this help\n"
|
||||||
" -v|--version print version info and exit\n"
|
|
||||||
" -?|--help show this help\n"
|
|
||||||
, progname);
|
, progname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,3 +8,12 @@ char* get_libdir()
|
|||||||
{
|
{
|
||||||
return libdir?libdir:(char*)default_libdir;
|
return libdir?libdir:(char*)default_libdir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the service cache directory
|
||||||
|
* @return The path to the cache directory
|
||||||
|
*/
|
||||||
|
char* get_cachedir()
|
||||||
|
{
|
||||||
|
return cachedir?cachedir:(char*)default_cachedir;
|
||||||
|
}
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
#include <housekeeper.h>
|
#include <housekeeper.h>
|
||||||
#include <resultset.h>
|
#include <resultset.h>
|
||||||
#include <gw.h>
|
#include <gw.h>
|
||||||
|
#include <gwdirs.h>
|
||||||
|
|
||||||
/** Defined in log_manager.cc */
|
/** Defined in log_manager.cc */
|
||||||
extern int lm_enabled_logfiles_bitmask;
|
extern int lm_enabled_logfiles_bitmask;
|
||||||
@ -259,15 +260,11 @@ GWPROTOCOL *funcs;
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Save authentication data to file cache */
|
/* Save authentication data to file cache */
|
||||||
char *ptr, path[4097];
|
char *ptr, path[PATH_MAX + 1];
|
||||||
int mkdir_rval = 0;
|
int mkdir_rval = 0;
|
||||||
strcpy(path, "/usr/local/mariadb-maxscale");
|
strcpy(path, get_cachedir());
|
||||||
if ((ptr = getenv("MAXSCALE_HOME")) != NULL)
|
|
||||||
{
|
|
||||||
strncpy(path, ptr, 4096);
|
|
||||||
}
|
|
||||||
strncat(path, "/", 4096);
|
strncat(path, "/", 4096);
|
||||||
strncat(path, service->name, 4096);
|
strncat(path, service->name, PATH_MAX);
|
||||||
if (access(path, R_OK) == -1)
|
if (access(path, R_OK) == -1)
|
||||||
{
|
{
|
||||||
mkdir_rval = mkdir(path, 0777);
|
mkdir_rval = mkdir(path, 0777);
|
||||||
@ -282,7 +279,7 @@ GWPROTOCOL *funcs;
|
|||||||
mkdir_rval = 0;
|
mkdir_rval = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncat(path, "/.cache", 4096);
|
strncat(path, "/.cache", PATH_MAX);
|
||||||
if (access(path, R_OK) == -1)
|
if (access(path, R_OK) == -1)
|
||||||
{
|
{
|
||||||
mkdir_rval = mkdir(path, 0777);
|
mkdir_rval = mkdir(path, 0777);
|
||||||
@ -296,7 +293,7 @@ GWPROTOCOL *funcs;
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
mkdir_rval = 0;
|
mkdir_rval = 0;
|
||||||
}
|
}
|
||||||
strncat(path, "/dbusers", 4096);
|
strncat(path, "/dbusers", PATH_MAX);
|
||||||
dbusers_save(service->users, path);
|
dbusers_save(service->users, path);
|
||||||
}
|
}
|
||||||
if (loaded == 0)
|
if (loaded == 0)
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
/** Default file locations, configured by CMake */
|
/** Default file locations, configured by CMake */
|
||||||
static const char* default_cnf_fname = "MaxScale.cnf";
|
static const char* default_cnf_fname = "maxscale.cnf";
|
||||||
static const char* default_configdir = "/etc/";
|
static const char* default_configdir = "/etc/";
|
||||||
static const char* default_piddir = "/var/run/maxscale/";
|
static const char* default_piddir = "/var/run/maxscale/";
|
||||||
static const char* default_logdir = "/var/log/maxscale/";
|
static const char* default_logdir = "/var/log/maxscale/";
|
||||||
|
@ -49,8 +49,8 @@ USER=$3
|
|||||||
PWD=$4
|
PWD=$4
|
||||||
HOST=$5
|
HOST=$5
|
||||||
PORT=$6
|
PORT=$6
|
||||||
CONF=$BINDIR/etc/MaxScale.cnf
|
CONF=$BINDIR/etc/maxscale.cnf
|
||||||
OLDCONF=$BINDIR/etc/MaxScale.cnf.old
|
OLDCONF=$BINDIR/etc/maxscale.cnf.old
|
||||||
MAXPID=$BINDIR/log/$(ls -1 $BINDIR/log|grep maxscale)
|
MAXPID=$BINDIR/log/$(ls -1 $BINDIR/log|grep maxscale)
|
||||||
TEST1=$SRCDIR/server/modules/filter/test/tee_recursion1.cnf
|
TEST1=$SRCDIR/server/modules/filter/test/tee_recursion1.cnf
|
||||||
TEST2=$SRCDIR/server/modules/filter/test/tee_recursion2.cnf
|
TEST2=$SRCDIR/server/modules/filter/test/tee_recursion2.cnf
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
[maxscale]
|
[maxscale]
|
||||||
threads=4
|
threads=4
|
||||||
|
libdir=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_LIBDIR@
|
||||||
|
logdir=@CMAKE_INSTALL_PREFIX@/log
|
||||||
|
datadir=@CMAKE_INSTALL_PREFIX@/data
|
||||||
|
cachedir=@CMAKE_INSTALL_PREFIX@/cache
|
||||||
|
|
||||||
[feedback]
|
[feedback]
|
||||||
feedback_enable=true
|
feedback_enable=true
|
Reference in New Issue
Block a user