[master 7/21] Add a function to tell us if the lvmetad socket exists.

vathpela installerbot-noreply at redhat.com
Wed Oct 7 20:50:42 UTC 2015


From: David Lehman <dlehman at redhat.com>

---
 blivet/devicelibs/lvm.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/blivet/devicelibs/lvm.py b/blivet/devicelibs/lvm.py
index 0872f11..647b59f 100644
--- a/blivet/devicelibs/lvm.py
+++ b/blivet/devicelibs/lvm.py
@@ -20,6 +20,7 @@
 # Author(s): Dave Lehman <dlehman at redhat.com>
 #
 
+import os
 import re
 
 from collections import namedtuple
@@ -56,6 +57,8 @@
 
 EXTERNAL_DEPENDENCIES = [availability.BLOCKDEV_LVM_PLUGIN]
 
+LVMETAD_SOCKET_PATH = "/run/lvm/lvmetad.socket"
+
 # Start config_args handling code
 #
 # Theoretically we can handle all that can be handled with the LVM --config
@@ -172,3 +175,6 @@ def determine_parent_lv(vg_name, internal_lv, lvs):
                 return lv
 
     return None
+
+def lvmetad_socket_exists():
+    return os.path.exists(LVMETAD_SOCKET_PATH)


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/70698c6d09adb2b80ee7e7aa40c3796281c1028f


More information about the anaconda-patches mailing list