Commit 5eb8b130 by Christian Brauner Committed by Stéphane Graber

tools: use correct exit code for lxc-stop

When the container is already running our manpage promises to exit with 2. Let's make it so. Signed-off-by: 's avatarChristian Brauner <christian.brauner@canonical.com>
parent 2ca5963c
......@@ -210,6 +210,9 @@ int main(int argc, char *argv[])
if (!c->is_running(c)) {
fprintf(stderr, "%s is not running\n", c->name);
/* Per our manpage we need to exit with exit code:
* 2: The specified container exists but was not running.
*/
ret = 2;
goto out;
}
......
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