diff options
author | Frederic Ouellet <fredericouellet@eaton.com> | 2019-07-25 15:58:50 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-26 08:41:38 +0100 |
commit | 21e2686775366dd4891e0d36d3812dc5a74d46fc (patch) | |
tree | d8fbc5dab42ac3f499d21e78663ae1b45e91f7b4 /meta/recipes-core | |
parent | 09af4dafc7d1f552ab2ced12d8d0b7e380c9f14e (diff) | |
download | poky-21e2686775366dd4891e0d36d3812dc5a74d46fc.tar.gz |
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>
Diffstat (limited to 'meta/recipes-core')
-rwxr-xr-x | meta/recipes-core/systemd/systemd-systemctl/systemctl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl index 8d7b3ba32d..8837f54e16 100755 --- a/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl | |||
@@ -28,6 +28,10 @@ class SystemdFile(): | |||
28 | def __init__(self, root, path): | 28 | def __init__(self, root, path): |
29 | self.sections = dict() | 29 | self.sections = dict() |
30 | self._parse(root, path) | 30 | self._parse(root, path) |
31 | dirname = os.path.basename(path.name) + ".d" | ||
32 | for location in locations: | ||
33 | for path2 in sorted((root / location / "system" / dirname).glob("*.conf")): | ||
34 | self._parse(root, path2) | ||
31 | 35 | ||
32 | def _parse(self, root, path): | 36 | def _parse(self, root, path): |
33 | """Parse a systemd syntax configuration file | 37 | """Parse a systemd syntax configuration file |
@@ -56,8 +60,11 @@ class SystemdFile(): | |||
56 | line = line.rstrip("\n") | 60 | line = line.rstrip("\n") |
57 | m = section_re.match(line) | 61 | m = section_re.match(line) |
58 | if m: | 62 | if m: |
59 | section = dict() | 63 | if m.group('section') not in self.sections: |
60 | self.sections[m.group('section')] = section | 64 | section = dict() |
65 | self.sections[m.group('section')] = section | ||
66 | else: | ||
67 | section = self.sections[m.group('section')] | ||
61 | continue | 68 | continue |
62 | 69 | ||
63 | while line.endswith("\\"): | 70 | while line.endswith("\\"): |