1lvmdbusd: create dirs for lock file
2
3Create leading dirs for lvmdbusd lock file, otherwise it fails to start:
4
5| systemd[1]: Starting LVM2 D-Bus service...
6| lvmdbusd[1602]: [1602]: Error during creation of lock file(/var/lock/lvm/lvmdbusd): errno(2), exiting!
7
8Upstream-Status: Submitted [https://gitlab.com/lvmteam/lvm2/-/merge_requests/7]
9
10Signed-off-by: Kai Kang <kai.kang@windriver.com>
11---
12 daemons/lvmdbusd/utils.py | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/daemons/lvmdbusd/utils.py b/daemons/lvmdbusd/utils.py
16index d479175f6..830648659 100644
17--- a/daemons/lvmdbusd/utils.py
18+++ b/daemons/lvmdbusd/utils.py
19@@ -778,6 +778,7 @@ class LockFile(object):
20
21 	def __enter__(self):
22 		try:
23+			os.makedirs(os.path.dirname(self.lock_file))
24 			self.fd = os.open(self.lock_file, os.O_CREAT | os.O_RDWR, stat.S_IRUSR | stat.S_IWUSR)
25
26 			# Get and set the close on exec and lock the file
27--
282.34.1
29
30