mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
tests: respect @CONFDIR@/machine-id
Obtain location of machine-id. NOTE: lvmconfig cannot dump 'life' value - should be fixed.
This commit is contained in:
parent
57a16abe2c
commit
a42c1c5728
@ -47,10 +47,12 @@ vgcreate $vg1 "$dev1"
|
|||||||
check vg_field $vg1 systemid $SID
|
check vg_field $vg1 systemid $SID
|
||||||
vgremove $vg1
|
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
|
## machineid
|
||||||
SID=$(cat /etc/machine-id)
|
if [ -e $etc/machine-id ]; then
|
||||||
|
SID=$(cat $etc/machine-id)
|
||||||
aux lvmconf "global/system_id_source = machineid"
|
aux lvmconf "global/system_id_source = machineid"
|
||||||
vgcreate $vg1 "$dev1"
|
vgcreate $vg1 "$dev1"
|
||||||
vgs -o+systemid $vg1
|
vgs -o+systemid $vg1
|
||||||
@ -608,8 +610,8 @@ rm -f $SIDFILE
|
|||||||
# The commands should proceed without a system_id.
|
# The commands should proceed without a system_id.
|
||||||
# Look at the warning/error messages.
|
# Look at the warning/error messages.
|
||||||
|
|
||||||
# vgcreate with source machineid, where no /etc/machine-id file exists
|
# vgcreate with source machineid, where no $etc/machine-id file exists
|
||||||
if [ ! -e /etc/machine-id ]; then
|
if [ ! -e $etc/machine-id ]; then
|
||||||
SID=""
|
SID=""
|
||||||
aux lvmconf "global/system_id_source = machineid"
|
aux lvmconf "global/system_id_source = machineid"
|
||||||
vgcreate $vg1 "$dev1" 2>&1 | tee err
|
vgcreate $vg1 "$dev1" 2>&1 | tee err
|
||||||
|
Loading…
Reference in New Issue
Block a user