]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tools/lxc-start: remove c->is_defined(c) check 1381/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 11 Jan 2017 15:20:20 +0000 (16:20 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 11 Jan 2017 15:20:20 +0000 (16:20 +0100)
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 <christian.brauner@ubuntu.com>
src/lxc/tools/lxc_start.c

index f5aa24bceb349cbb02dc604bf0253f838f4969f0..3c17ea0f981a859dbacfab17ab8111704c9d4800 100644 (file)
@@ -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);