summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-05-14 10:51:34 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2015-05-14 10:52:55 +0200
commita42c1c5728d28b8903725694afb3735dac62f11a (patch)
treecf6122b79d5a804aebeb5e4dfec59f78fd64460c
parent57a16abe2ce75f65306b70a4dd8e1cd45cbe385d (diff)
downloadlvm2-a42c1c5728d28b8903725694afb3735dac62f11a.tar.gz
tests: respect @CONFDIR@/machine-id
Obtain location of machine-id. NOTE: lvmconfig cannot dump 'life' value - should be fixed.
-rw-r--r--test/shell/system_id.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/shell/system_id.sh b/test/shell/system_id.sh
index 3e3fa9478..5bb5c3a9e 100644
--- a/test/shell/system_id.sh
+++ b/test/shell/system_id.sh
@@ -47,10 +47,12 @@ vgcreate $vg1 "$dev1"
check vg_field $vg1 systemid $SID
vgremove $vg1
-## machineid
+# FIXME - print 'life' config data
+eval $(lvmconfig global/etc 2>/dev/null || lvmconfig --type default global/etc)
-if [ -e /etc/machine-id ]; then
-SID=$(cat /etc/machine-id)
+## machineid
+if [ -e $etc/machine-id ]; then
+SID=$(cat $etc/machine-id)
aux lvmconf "global/system_id_source = machineid"
vgcreate $vg1 "$dev1"
vgs -o+systemid $vg1
@@ -608,8 +610,8 @@ rm -f $SIDFILE
# The commands should proceed without a system_id.
# Look at the warning/error messages.
-# vgcreate with source machineid, where no /etc/machine-id file exists
-if [ ! -e /etc/machine-id ]; then
+# vgcreate with source machineid, where no $etc/machine-id file exists
+if [ ! -e $etc/machine-id ]; then
SID=""
aux lvmconf "global/system_id_source = machineid"
vgcreate $vg1 "$dev1" 2>&1 | tee err