Fix lockdir not taking the value of backupdir

Thanks Claudio Kuenzler
master
Daniel Berteaud 3 年之前
父節點 51acbb30a0
當前提交 22447576c9
  1. 4
      virt-backup

@ -48,7 +48,7 @@ $opts{backupdir} = '/var/lib/libvirt/backup';
$opts{dumpcmd} = undef;
# Lockdir is where locks will be held when backing up a VM. The default is to put the lock
# in the backup dir of the VM, but in some situations, you want to put it elsewhere
$opts{lockdir} = $opts{backupdir};
$opts{lockdir} = undef;
# Size of LVM snapshots (which will be used to backup VM with minimum downtime
# if the VM is backed by LVM). If the LVM volume is thinly provisionned (thinp)
# this parameter will be ignored
@ -213,6 +213,8 @@ if (! -d $opts{backupdir} ){
exit 1;
}
# If lockdir is not defined, take the same value as backupdir
$opts{lockdir} ||= $opts{backupdir};
# Lockdir, if defined, must also exist
if (!-d $opts{lockdir}){
print "$opts{lockdir} doesn't exist\n";

Loading…
取消
儲存