CC: | debian-perl [...] lists.debian.org |
Subject: | location of lvm binaries in Linux::LVM |
Date: | Sun, 31 Aug 2008 17:10:45 -0300 |
To: | bug-linux-lvm [...] rt.cpan.org |
From: | David Bremner <bremner [...] unb.ca> |
Dear Chad;
On Debian, we had to apply the patch below to get your module to find
the lvm binaries, which for us are in /sbin.
I could see it being distro dependent where these binaries ended up;
perhaps the nicest thing would be to have a configure option for
Makefile.PL.
In any case I guess you want the error messages to match the test :-).
--- liblinux-lvm-perl.orig/LVM.pm
+++ liblinux-lvm-perl/LVM.pm
@@ -151,8 +151,8 @@
my $lvn;
my $pvn;
- if( ! -e "/usr/sbin/vgdisplay" ) { die("LVM utilities not installed in /sbin"); }
- my @vginfo = `/usr/sbin/vgdisplay -v`;
+ if( ! -e "/sbin/vgdisplay" ) { die("LVM utilities not installed in /sbin"); }
+ my @vginfo = `/sbin/vgdisplay -v`;
VGINF: foreach(@vginfo) {
chomp;
@@ -361,8 +361,8 @@
my %pvhash;
if( ! -e "$pvname" ) { die("Physical Disk: $pvname does not exist."); }
- if( ! -e "/usr/sbin/pvdisplay" ) { die("LVM utilities not installed in /sbin"); }
- my @pvinfo = `/usr/sbin/pvdisplay $pvname`;
+ if( ! -e "/sbin/pvdisplay" ) { die("LVM utilities not installed in /sbin"); }
+ my @pvinfo = `/sbin/pvdisplay $pvname`;
PVINF: foreach(@pvinfo) {
# Get the name of the physical volume.
@@ -445,8 +445,8 @@
my $lvname = $_[0];
my %lvhash;
if( ! -e "$lvname" ) { die("Logical Disk: $lvname does not exist."); }
- if( ! -e "/usr/sbin/lvdisplay" ) { die("LVM utilities not installed in /sbin"); }
- my @lvinfo = `/usr/sbin/lvdisplay $lvname`;
+ if( ! -e "/sbin/lvdisplay" ) { die("LVM utilities not installed in /sbin"); }
+ my @lvinfo = `/sbin/lvdisplay $lvname`;
LVINF: foreach(@lvinfo) {