daemon: Use a private copy of /etc/lvm so we don't modify the real config.
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 4 Nov 2011 15:55:13 +0000 (15:55 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 9 Nov 2011 22:08:06 +0000 (22:08 +0000)
commit400b2cb03d5f7e606707d01ef278438c4b8440dc
treed7d40effd5011191459022b90a1b9cc1212315e1
parent95ee3c98cf37dee3806cb9e8cdab1d1f024ae0e5
daemon: Use a private copy of /etc/lvm so we don't modify the real config.

In the libguestfs live case we need to be careful not to modify the
real /etc/lvm/lvm.conf file (when setting the filter rule).

When the daemon starts, make a complete copy of /etc/lvm in a
temporary directory, and adjust LVM_SYSTEM_DIR to point to the copy.
All changes are made in the temporary copy.
(cherry picked from commit 9c299b64bb24cefafa582fe425bb65b78373d205)
daemon/daemon.h
daemon/guestfsd.c
daemon/lvm-filter.c