From b7b5063982a0d40f2b39a523e43ffd3df9aed273 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 23 Jun 2014 11:22:27 +0200 Subject: [PATCH] Don't summarize disks if backup doesn't run --- virt-backup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt-backup b/virt-backup index ac0e7da..c123ab9 100644 --- a/virt-backup +++ b/virt-backup @@ -418,7 +418,7 @@ sub prepare_backup{ } # Summarize the list of disk to be dumped - if ($opts{debug}){ + if ($opts{debug} && ($opts{livebackup} || $opts{offline})){ if ($opts{action} eq 'dump'){ print "\n\nThe following disks will be dumped:\n\n"; foreach $disk (@disks){ @@ -463,7 +463,7 @@ sub prepare_backup{ # Are offline backups allowed ? elsif (!$opts{offline}){ run_cleanup(); - die "\nOffline backups disabled, sorry, I cannot continue\n"; + die "Offline backups disabled, sorry, I cannot continue\n\n"; } }