Fixing dockerctl restore/stop

This change fixes the stop_container logic so that it correctly passes
the keys from the CONTAINER_NAMES array to the stop_container function
when 'all' is given. Previously the logic was incorrectly passing the
values from the CONTAINER_NAMES array so the docker stop command was
failing as part of a restore or a stop all.

Change-Id: Id1d879ce9e4439b521a807e8e4abe18aada420a3
Related-Bug: 1485985
Closes-Bug: 1488541
This commit is contained in:
Alex Schultz 2015-08-25 16:03:07 -05:00
parent a0e2b70120
commit f0026012fc

View File

@ -322,7 +322,7 @@ function lxc_shell_container {
function stop_container {
if [ "$1" = "all" ]; then
for container in ${CONTAINER_NAMES[@]}; do
for container in ${!CONTAINER_NAMES[@]}; do
stop_container $container
done
return