Permalink
Browse files

qemu shutdown: minor print fixes

  • Loading branch information...
1 parent 34a31be commit ed77594e68b270b60d40c4ae5e6379478230fd39 Guido De Rosa committed Mar 15, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 modules/qemu/etc/shutdown/40qemu.rb
@@ -5,9 +5,13 @@
SHUTDOWN_TIMEOUT = 420
QUICK_SAVEVM_TIMEOUT = 120
-OnBoard::Virtualization::QEMU.get_all.each do |vm|
+running_VMs = OnBoard::Virtualization::QEMU.get_all.select{|vm| vm.running?}
+
+puts if running_VMs.any?
+
+running_VMs.each do |vm|
next unless vm.running?
- print "\n Shutting down VM '#{vm.name}'... "
+ puts " Shutting down VM '#{vm.name}'... "
STDOUT.flush
if vm.quick_snapshots?
begin
@@ -32,3 +36,5 @@
end
+
+

0 comments on commit ed77594

Please sign in to comment.