diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2011-09-19 13:51:09 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2011-09-19 13:51:09 +0000 |
commit | 53c09bce4228715b181fc8da96d012cc55cb9bdd (patch) | |
tree | 1af4bf9ef4253c2b8b89e4e3f28db03b4c1a7136 /scripts | |
parent | d2010960c921cef648014e0ca5d0f598d5c712ab (diff) | |
download | lvm2-53c09bce4228715b181fc8da96d012cc55cb9bdd.tar.gz lvm2-53c09bce4228715b181fc8da96d012cc55cb9bdd.tar.xz lvm2-53c09bce4228715b181fc8da96d012cc55cb9bdd.zip |
Support different PATH setting
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.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/fsadm.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh index db9d9654..684f5cd6 100644 --- a/scripts/fsadm.sh +++ b/scripts/fsadm.sh @@ -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} } |