[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

location of lvm binaries in Linux::LVM



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) {
 


Reply to: