add ephemeral to nspawn-settings.

This commit is contained in:
Jiuyang liu
2018-10-24 10:22:20 +02:00
committed by Lennart Poettering
parent c8758e726c
commit a2f577fca0
4 changed files with 20 additions and 3 deletions
+4
View File
@@ -574,6 +574,7 @@ static int parse_argv(int argc, char *argv[]) {
case 'x':
arg_ephemeral = true;
arg_settings_mask |= SETTING_EPHEMERAL;
break;
case 'u':
@@ -3380,6 +3381,9 @@ static int merge_settings(Settings *settings, const char *path) {
strv_free_and_replace(arg_parameters, settings->parameters);
}
if ((arg_settings_mask & SETTING_EPHEMERAL) == 0)
arg_ephemeral = settings->ephemeral;
if ((arg_settings_mask & SETTING_PIVOT_ROOT) == 0 &&
settings->pivot_root_new) {
free_and_replace(arg_pivot_root_new, settings->pivot_root_new);