Commit 01e6b714 by Serge Hallyn

lxc_destroy: print an error if the container is not defined.

parent b98f7d6e
...@@ -84,9 +84,16 @@ int main(int argc, char *argv[]) ...@@ -84,9 +84,16 @@ int main(int argc, char *argv[])
exit(1); exit(1);
} }
if (!c->is_defined(c)) {
fprintf(stderr, "Container is not defined\n");
lxc_container_put(c);
exit(1);
}
if (c->is_running(c)) { if (c->is_running(c)) {
if (!my_args.force) { if (!my_args.force) {
fprintf(stderr, "%s is running\n", my_args.name); fprintf(stderr, "%s is running\n", my_args.name);
lxc_container_put(c);
exit(1); exit(1);
} }
c->stop(c); c->stop(c);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment