]> sourceware.org Git - lvm2.git/commitdiff
Support different PATH setting
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 19 Sep 2011 13:51:09 +0000 (13:51 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 19 Sep 2011 13:51:09 +0000 (13:51 +0000)
When fsadm is test - it needs to execute lvm and fsadm from non-standard path
setting.   So adding a support in fsadm script when user set LVM_BINARY, then
the lvm command invoced from fsadm will have the same PATH setting as before
entering  fsadm command.

Needed for testing.

WHATS_NEW
scripts/fsadm.sh

index 8f475f367a12f76903274a526bbe1256cac3aa32..d8eea12ef802abd0bd8a7338f280cb59115ac61a 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.89 - 
 ==================================
+  Support different PATH setting for fsadm script testing.
   Surround all executed commands with quotes in fsadm script.
   Fix missing '$' in test for content of "$LVM" in fsadm script.
   Move debug message in exec_cmd after sync_local_dev_names.
index db9d96540d184bb10c458e4332bd6dba46cfb218..684f5cd6eb761a34c4f5a2d861a1308ba0c112fb 100644 (file)
@@ -31,6 +31,7 @@
 
 TOOL=fsadm
 
+_SAVEPATH=$PATH
 PATH=/sbin:/usr/sbin:/bin:/usr/sbin:$PATH
 
 # utilities
@@ -140,9 +141,10 @@ cleanup() {
                _FSADM_YES=$YES
                export _FSADM_YES
                unset FSADM_RUNNING
+               test -n "$LVM_BINARY" && PATH=$_SAVEPATH
                dry exec "$LVM" lvresize $VERB $FORCE -r -L${NEWSIZE}b "$VOLUME_ORIG"
        fi
-        
+
        # error exit status for break
        exit ${1:-1}
 }
This page took 0.046944 seconds and 5 git commands to generate.