From c717011f8eb8df047bf82065a1136f86595cfe72 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 2 Mar 2017 23:01:30 +0100 Subject: [PATCH] tests: use LVM_SYSTEM_DIR for etc Instead of hardcoding etc/ dir use $LVM_SYSTEM_DIR. --- test/lib/aux.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/lib/aux.sh b/test/lib/aux.sh index b0e6556d4..bc10b4432 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -1213,22 +1213,24 @@ EOF lvmconf() { unset profile_name generate_config "$@" - mv -f CONFIG etc/lvm.conf + mv -f CONFIG "$LVM_SYSTEM_DIR/lvm.conf" } profileconf() { + local pdir="$LVM_SYSTEM_DIR/profile" profile_name="$1" shift generate_config "$@" - mkdir -p etc/profile - mv -f "PROFILE_$profile_name" "etc/profile/$profile_name.profile" + mkdir -p $pdir + mv -f "PROFILE_$profile_name" "$pdir/$profile_name.profile" } prepare_profiles() { - mkdir -p etc/profile + local pdir="$LVM_SYSTEM_DIR/profile" + mkdir -p $pdir for profile_name in $@; do test -L "lib/$profile_name.profile" || skip - cp "lib/$profile_name.profile" "etc/profile/$profile_name.profile" + cp "lib/$profile_name.profile" "$pdir/$profile_name.profile" done }