Skip to content

Commit

Permalink
tools/lxc_autostart: don't fail when there are no containers
Browse files Browse the repository at this point in the history
Fixes: lxc#3847
Signed-off-by: Alexander Mikhalitsyn <[email protected]>
  • Loading branch information
mihalicyn committed Apr 2, 2024
1 parent 80e28c1 commit 989ea39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/tools/lxc_autostart.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ int lxc_autostart_main(int argc, char *argv[])
toss_list(cmd_groups_list);
free(containers);

if (failed == count)
if (failed > 0 && failed == count)
exit(EXIT_FAILURE); /* Total failure */
else if (failed > 0)
exit(2); /* Partial failure */
Expand Down

0 comments on commit 989ea39

Please sign in to comment.