summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-core/systemd/systemd-systemctl/systemctl')
-rwxr-xr-xpoky/meta/recipes-core/systemd/systemd-systemctl/systemctl13
1 files changed, 10 insertions, 3 deletions
diff --git a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 8d7b3ba32..ebac86373 100755
--- a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -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
@@ -53,11 +57,14 @@ class SystemdFile():
if skip_re.match(line):
continue
- line = line.rstrip("\n")
+ line = line.strip()
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("\\"):