From 5cd7b832ed35d4bafe79dcfe5a77908de7020c9a Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 8 Aug 2013 19:10:31 +0200 Subject: [PATCH] Always define $libvirt2 --- virt-backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-backup b/virt-backup index e7c7591..dc597ca 100644 --- a/virt-backup +++ b/virt-backup @@ -179,9 +179,9 @@ if (! -d $opts{backupdir} ){ print "\n\nConnecting to libvirt daemon using $connect[0] as URI\n" if ($opts{debug}); $libvirt1 = Sys::Virt->new( uri => $connect[0] ) || die "Error connecting to libvirt on URI: $connect[0]"; +$libvirt2 = ''; if (defined $connect[1]){ - $libvirt2 = ''; eval { $libvirt2 = Sys::Virt->new( uri => $connect[1] ); }; if ($@ && $opts{debug}){ print "Error connecting to libvirt on URI: $connect[1], lets hope is out of order\n";