mirror of
git://github.com/lxc/lxc
synced 2025-09-01 16:39:30 +00:00
c/r: add support for CRIU's --action-script
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
This commit is contained in:
@@ -185,6 +185,9 @@ static void exec_criu(struct criu_opts *opts)
|
|||||||
if (opts->user->verbose)
|
if (opts->user->verbose)
|
||||||
static_args++;
|
static_args++;
|
||||||
|
|
||||||
|
if (opts->user->action_script)
|
||||||
|
static_args += 2;
|
||||||
|
|
||||||
ret = snprintf(log, PATH_MAX, "%s/%s.log", opts->user->directory, opts->action);
|
ret = snprintf(log, PATH_MAX, "%s/%s.log", opts->user->directory, opts->action);
|
||||||
if (ret < 0 || ret >= PATH_MAX) {
|
if (ret < 0 || ret >= PATH_MAX) {
|
||||||
ERROR("logfile name too long\n");
|
ERROR("logfile name too long\n");
|
||||||
@@ -235,6 +238,11 @@ static void exec_criu(struct criu_opts *opts)
|
|||||||
if (opts->user->verbose)
|
if (opts->user->verbose)
|
||||||
DECLARE_ARG("-vvvvvv");
|
DECLARE_ARG("-vvvvvv");
|
||||||
|
|
||||||
|
if (opts->user->action_script) {
|
||||||
|
DECLARE_ARG("--action-script");
|
||||||
|
DECLARE_ARG(opts->user->action_script);
|
||||||
|
}
|
||||||
|
|
||||||
if (strcmp(opts->action, "dump") == 0 || strcmp(opts->action, "pre-dump") == 0) {
|
if (strcmp(opts->action, "dump") == 0 || strcmp(opts->action, "pre-dump") == 0) {
|
||||||
char pid[32], *freezer_relative;
|
char pid[32], *freezer_relative;
|
||||||
|
|
||||||
|
@@ -891,6 +891,11 @@ struct migrate_opts {
|
|||||||
* won't if e.g. you rsync the filesystems between two machines.
|
* won't if e.g. you rsync the filesystems between two machines.
|
||||||
*/
|
*/
|
||||||
bool preserves_inodes;
|
bool preserves_inodes;
|
||||||
|
|
||||||
|
/* Path to an executable script that will be registered as a criu
|
||||||
|
* "action script"
|
||||||
|
*/
|
||||||
|
char *action_script;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Reference in New Issue
Block a user