mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 21:32:12 +02:00
systemd: Add partial support of drop-in configuration files to systemd-systemctl-native
Support for serive-name.service.d/ folders containing .conf files It don't support all the partial folder names See https://www.freedesktop.org/software/systemd/man/systemd.unit.html (From OE-Core rev: 32ed8e53109f4384970fb540e44cc2f7fcafb2a5) Signed-off-by: Frederic Ouellet <fredericouellet@eaton.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
09af4dafc7
commit
21e2686775
@@ -28,6 +28,10 @@ class SystemdFile():
|
||||
def __init__(self, root, path):
|
||||
self.sections = dict()
|
||||
self._parse(root, path)
|
||||
dirname = os.path.basename(path.name) + ".d"
|
||||
for location in locations:
|
||||
for path2 in sorted((root / location / "system" / dirname).glob("*.conf")):
|
||||
self._parse(root, path2)
|
||||
|
||||
def _parse(self, root, path):
|
||||
"""Parse a systemd syntax configuration file
|
||||
@@ -56,8 +60,11 @@ class SystemdFile():
|
||||
line = line.rstrip("\n")
|
||||
m = section_re.match(line)
|
||||
if m:
|
||||
section = dict()
|
||||
self.sections[m.group('section')] = section
|
||||
if m.group('section') not in self.sections:
|
||||
section = dict()
|
||||
self.sections[m.group('section')] = section
|
||||
else:
|
||||
section = self.sections[m.group('section')]
|
||||
continue
|
||||
|
||||
while line.endswith("\\"):
|
||||
|
||||
Reference in New Issue
Block a user