Commits
Kir Kolyshkin authored 76c9ca21206
etc/init.d/vz*: fix CT (re)start Commit af5bf43 introduced support for restarting containers that were running before reboot. Unfortunately, there is a bug in this code: # List CTs from vzrebootdir plus the ones with ONBOOT=yes velist=$(ls $VZREBOOTDIR; vzlist -aH -octid,onboot | awk '$2 == "yes" {print $1}') # Then sort by bootorder velist=$(vzlist -aH -octid -s-bootorder $velist) If velist is empty after the first step, second step (sorting by bootorder) lists ALL the containers. The fix, as pointed out by Tom P, is to check if velist is empty. http://bugzilla.openvz.org/2424 Reported-by: Tom P <tomp@tomp.co.uk> Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit b59b873dbf602c2ab2d6248eef149c220d28d0ba)