2
# Copyright (C) 2011-2012 Red Hat, Inc.
4
# This copyrighted material is made available to anyone wishing to use,
5
# modify, copy, or redistribute it subject to the terms and conditions
6
# of the GNU General Public License v.2.
8
# You should have received a copy of the GNU General Public License
9
# along with this program; if not, write to the Free Software Foundation,
10
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
4
cmd=$(echo ./$0|sed "s,.*/,,")
6
test "$cmd" = lvm && exec "$abs_top_builddir/tools/lvm" "$@"
7
exec "$abs_top_builddir/tools/lvm" "$cmd" "$@"
15
test "$CMD" != lvm || unset CMD
17
# Multiple level of LVM_VALGRIND support
18
# the higher level the more commands are traced
19
if test -n "$LVM_VALGRIND"; then
20
RUN_VALGRIND="aux run_valgrind";
22
lvs|pvs|vgs|vgck|vgscan)
23
test "$LVM_VALGRIND" -gt 2 || unset RUN_VALGRIND ;;
24
pvcreate|pvremove|lvremove|vgcreate|vgremove)
25
test "$LVM_VALGRIND" -gt 1 || unset RUN_VALGRIND ;;
27
test "$LVM_VALGRIND" -gt 0 || unset RUN_VALGRIND ;;
31
$RUN_VALGRIND "$abs_top_builddir/tools/lvm" $CMD "$@" && \
32
rm -f debug.log # Remove log for successful command