1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

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.
This commit is contained in:
Zdenek Kabelac 2011-09-19 13:51:09 +00:00
parent d2010960c9
commit 53c09bce42
2 changed files with 4 additions and 1 deletions

View File

@ -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.

View 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}
}