From: Zdenek Kabelac Date: Mon, 19 Sep 2011 13:51:09 +0000 (+0000) Subject: Support different PATH setting X-Git-Tag: old-v2_02_89~464 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=304c544ce530c8084a5e4f7016f63cee9d2532c1;p=lvm2.git 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. --- diff --git a/WHATS_NEW b/WHATS_NEW index 8f475f367..d8eea12ef 100644 --- 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. diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh index db9d96540..684f5cd6e 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} }