Allow paths to be created if they don't exist

A module can now declare a path parameter for a directory that does not
yet exist. If the directory does not exist, MaxScale will create the
directory with the requested permissions.
This commit is contained in:
Markus Mäkelä
2017-04-20 12:53:17 +03:00
parent e4941044aa
commit 5704ae5ffd
4 changed files with 43 additions and 7 deletions

View File

@ -201,7 +201,14 @@ MXS_MODULE* MXS_CREATE_MODULE()
{"burstsize", MXS_MODULE_PARAM_SIZE, DEF_BURST_SIZE},
{"heartbeat", MXS_MODULE_PARAM_COUNT, BLR_HEARTBEAT_DEFAULT_INTERVAL},
{"send_slave_heartbeat", MXS_MODULE_PARAM_BOOL, "false"},
{"binlogdir", MXS_MODULE_PARAM_PATH, NULL, MXS_MODULE_OPT_PATH_W_OK},
{
"binlogdir",
MXS_MODULE_PARAM_PATH,
NULL,
MXS_MODULE_OPT_PATH_R_OK |
MXS_MODULE_OPT_PATH_W_OK |
MXS_MODULE_OPT_PATH_CREAT
},
{"ssl_cert_verification_depth", MXS_MODULE_PARAM_COUNT, "9"},
{MXS_END_MODULE_PARAMS}
}