From: Christian Brauner Date: Wed, 11 Jan 2017 15:20:20 +0000 (+0100) Subject: tools/lxc-start: remove c->is_defined(c) check X-Git-Tag: lxc-2.1.0~213^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1381%2Fhead;p=thirdparty%2Flxc.git tools/lxc-start: remove c->is_defined(c) check We do not check here whether the container is defined, because we support volatile containers. Which means the container does not need to be created for it to be started. You can just pass a configuration file as argument and start the container right away. Signed-off-by: Christian Brauner --- diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c index f5aa24bce..3c17ea0f9 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -286,10 +286,11 @@ int main(int argc, char *argv[]) } } - if (!c->is_defined(c)) { - fprintf(stderr, "Error: container %s is not defined\n", c->name); - goto out; - } + /* We do not check here whether the container is defined, because we + * support volatile containers. Which means the container does not need + * to be created for it to be started. You can just pass a configuration + * file as argument and start the container right away. + */ if (!c->may_control(c)) { fprintf(stderr, "Insufficent privileges to control %s\n", c->name);