diff --git a/virt-backup b/virt-backup index 9b6a3d8..3ab237b 100644 --- a/virt-backup +++ b/virt-backup @@ -71,9 +71,9 @@ $opts{connect} = "qemu:///system"; # Compression used with the dump action (the compression is done on the fly) $opts{compress} = 'none'; # lvcreate path -$opts{lvcreate} = 'lvcreate -c 512'; +$opts{lvcreate} = '/sbin/lvcreate -c 512'; # lvremove path -$opts{lvremove} = 'lvremove'; +$opts{lvremove} = '/sbin/lvremove'; # chunkfs path $opts{chunkfs} = '/usr/bin/chunkfs'; # Size of chunks to use with chunkfs or or blocks with dd in bytes (default to 256kB) diff --git a/virt-backup.spec b/virt-backup.spec index 1f8dd30..af6d5ab 100644 --- a/virt-backup.spec +++ b/virt-backup.spec @@ -39,6 +39,10 @@ etc... %{__rm} -rf $RPM_BUILD_ROOT +%if %{?fedora}%{?rhel} <= 5 +sed -i -e "s|/sbin/lvcreate|/usr/sbin/lvcreate|g" -e "s|/sbin/lvremove|/usr/sbin/lvremove|g" virt-backup +%endif + # Install backup script %{__mkdir_p} $RPM_BUILD_ROOT%{_bindir}/ %{__install} -m 0755 virt-backup $RPM_BUILD_ROOT%{_bindir}/