[lxc-devel] [PATCH] lxc_autostart: Update following shutdown() API change

Stéphane Graber stgraber at ubuntu.com
Fri Feb 7 15:23:57 UTC 2014


Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 src/lxc/lxc_autostart.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lxc/lxc_autostart.c b/src/lxc/lxc_autostart.c
index ed62294..cfb24d0 100644
--- a/src/lxc/lxc_autostart.c
+++ b/src/lxc/lxc_autostart.c
@@ -280,8 +280,11 @@ int main(int argc, char *argv[])
 				if (my_args.list)
 					printf("%s\n", c->name);
 				else {
-					if (!c->shutdown(c, my_args.timeout))
-						fprintf(stderr, "Error shutting down container: %s\n", c->name);
+					if (!c->shutdown(c, my_args.timeout)) {
+						if (!c->stop(c)) {
+							fprintf(stderr, "Error shutting down container: %s\n", c->name);
+						}
+					}
 				}
 			}
 		}
-- 
1.9.rc1



More information about the lxc-devel mailing list