]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-start-ephemeral: Drop stop() calls when shutdown() returns non-True
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 13 Sep 2012 14:03:21 +0000 (10:03 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 12 Nov 2012 18:18:32 +0000 (13:18 -0500)
shutdown() when given a timeout already does a stop call so there's no
need to check its return value and do another one.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc-start-ephemeral.in

index 72b2114ba11e3003e4567dd113a171d23b0ead71..70b1150daaa4d5f0e007a881173670201e9f0aab 100644 (file)
@@ -251,8 +251,7 @@ The following IP addresses have be found in the container:
         sys.exit(0)
     else:
         dest.console(tty=1)
-        if not dest.shutdown(timeout=5):
-            dest.stop()
+        dest.shutdown(timeout=5)
         sys.exit(0)
 
 # Now deal with the case where we want to run a command in the container
@@ -286,5 +285,4 @@ for ip in ips:
     break
 
 # Shutdown the container
-if not dest.shutdown(timeout=5):
-    dest.stop()
+dest.shutdown(timeout=5)