Removed old unused cmake variables, updated documentation and fixed testall suite.
This commit is contained in:
@ -154,6 +154,7 @@ static struct option long_options[] = {
|
||||
{"logdir", required_argument, 0, 'L'},
|
||||
{"datadir", required_argument, 0, 'D'},
|
||||
{"configdir",required_argument, 0, 'C'},
|
||||
{"piddir",required_argument, 0, 'P'},
|
||||
{"libdir",required_argument, 0, 'B'},
|
||||
{"cachedir",required_argument, 0, 'A'},
|
||||
{"language",required_argument, 0, 'N'},
|
||||
@ -870,6 +871,8 @@ static void usage(void)
|
||||
" (default: /etc/)\n"
|
||||
" -D, --datadir=PATH path to data directory, stored embedded mysql tables\n"
|
||||
" (default: /var/cache/maxscale)\n"
|
||||
" -P, --piddir=PATH path to PID file directory\n"
|
||||
" (default: /var/run/maxscale)\n"
|
||||
" -U, --user=USER run MaxScale as another user.\n"
|
||||
" The user ID and group ID of this user are used to run MaxScale.\n"
|
||||
" -s, --syslog=[yes|no] log messages to syslog (default:yes)\n"
|
||||
@ -976,7 +979,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
while ((opt = getopt_long(argc, argv, "dc:f:l:vs:S:?L:D:C:B:U:A:",
|
||||
while ((opt = getopt_long(argc, argv, "dc:f:l:vs:S:?L:D:C:B:U:A:P:",
|
||||
long_options, &option_index)) != -1)
|
||||
{
|
||||
bool succp = true;
|
||||
@ -1045,6 +1048,12 @@ int main(int argc, char **argv)
|
||||
langdir = tmp_path;
|
||||
}
|
||||
break;
|
||||
case 'P':
|
||||
if(handle_path_arg(&tmp_path,optarg,NULL,true,true))
|
||||
{
|
||||
piddir = tmp_path;
|
||||
}
|
||||
break;
|
||||
case 'D':
|
||||
sprintf(datadir,"%s",optarg);
|
||||
maxscaledatadir = strdup(optarg);
|
||||
@ -1821,7 +1830,7 @@ static int write_pid_file(char *home_dir) {
|
||||
|
||||
int fd = -1;
|
||||
|
||||
snprintf(pidfile, PATH_MAX, "%smaxscale.pid",default_piddir);
|
||||
snprintf(pidfile, PATH_MAX, "%smaxscale.pid",piddir?piddir:default_piddir);
|
||||
|
||||
fd = open(pidfile, O_WRONLY | O_CREAT | O_TRUNC, 0777);
|
||||
if (fd == -1) {
|
||||
@ -1920,6 +1929,11 @@ static int cnf_preparser(void* data, const char* section, const char* name, cons
|
||||
if(libdir == NULL)
|
||||
handle_path_arg(&libdir,(char*)value,NULL,true,false);
|
||||
}
|
||||
else if(strcmp(name, "piddir") == 0)
|
||||
{
|
||||
if(piddir == NULL)
|
||||
handle_path_arg(&piddir,(char*)value,NULL,true,true);
|
||||
}
|
||||
else if(strcmp(name, "datadir") == 0)
|
||||
{
|
||||
if(!datadir_defined)
|
||||
|
@ -37,7 +37,7 @@ static char* libdir = NULL;
|
||||
static char* cachedir = NULL;
|
||||
static char* maxscaledatadir = NULL;
|
||||
static char* langdir = NULL;
|
||||
|
||||
static char* piddir = NULL;
|
||||
char* get_libdir();
|
||||
char* get_datadir();
|
||||
char* get_cachedir();
|
||||
|
@ -17,8 +17,8 @@ function execute_test()
|
||||
return 1
|
||||
fi
|
||||
|
||||
LAST_LOG=$(ls $BINDIR/log -1|grep err|sort|uniq|tail -n 1)
|
||||
TEST_RESULT=$(cat $BINDIR/log/$LAST_LOG | grep -i recursive)
|
||||
LAST_LOG=$(ls $BINDIR/ -1|grep error|sort|uniq|tail -n 1)
|
||||
TEST_RESULT=$(cat $BINDIR/$LAST_LOG | grep -i recursive)
|
||||
if [[ "$TEST_RESULT" != "" ]]
|
||||
then
|
||||
return 0
|
||||
|
@ -1,10 +1,11 @@
|
||||
[maxscale]
|
||||
threads=4
|
||||
libdir=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_LIBDIR@
|
||||
logdir=@CMAKE_INSTALL_PREFIX@/log
|
||||
datadir=@CMAKE_INSTALL_PREFIX@/data
|
||||
cachedir=@CMAKE_INSTALL_PREFIX@/cache
|
||||
logdir=@CMAKE_INSTALL_PREFIX@/
|
||||
datadir=@CMAKE_INSTALL_PREFIX@/
|
||||
cachedir=@CMAKE_INSTALL_PREFIX@/
|
||||
language=@CMAKE_INSTALL_PREFIX@/lib/maxscale/
|
||||
piddir=@CMAKE_INSTALL_PREFIX@/
|
||||
|
||||
[feedback]
|
||||
feedback_enable=true
|
||||
|
Reference in New Issue
Block a user