mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-16 09:01:09 +00:00
lxc-start-ephemeral: Drop stop() calls when shutdown() returns non-True
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>
This commit is contained in:
parent
225b52ef15
commit
9737a2060c
@ -251,8 +251,7 @@ The following IP addresses have be found in the container:
|
|||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
dest.console(tty=1)
|
dest.console(tty=1)
|
||||||
if not dest.shutdown(timeout=5):
|
dest.shutdown(timeout=5)
|
||||||
dest.stop()
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
# Now deal with the case where we want to run a command in the container
|
# Now deal with the case where we want to run a command in the container
|
||||||
@ -286,5 +285,4 @@ for ip in ips:
|
|||||||
break
|
break
|
||||||
|
|
||||||
# Shutdown the container
|
# Shutdown the container
|
||||||
if not dest.shutdown(timeout=5):
|
dest.shutdown(timeout=5)
|
||||||
dest.stop()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user