Skip to content

Commit

Permalink
Merge pull request #240 from jouvin/systemd_schema_fix
Browse files Browse the repository at this point in the history
ncm-systemd schema: port fix from configuration-module-core/main
  • Loading branch information
jrha authored Dec 18, 2024
2 parents 5f34fc4 + f79adf6 commit 5f63b84
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions components/systemd/schema.pan
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,13 @@ type systemd_component = {
# escaped full unitnames are allowed (or use shortnames and type)
"unit" ? systemd_unit_type{}
} with {
foreach(name; unit; SELF["unit"]) {
if (unit["type"] == "mount" && exists(unit["file"]) && exists(unit["file"]["config"]["mount"])) {
goodname = systemd_make_mountunit(unit["file"]["config"]["mount"]["Where"]);
if(goodname != name) {
error('Incorrect name for mount unit, the name must match Where: %s vs %s', name, goodname);
if (is_defined(SELF["unit"])) {
foreach(name; unit; SELF["unit"]) {
if (unit["type"] == "mount" && exists(unit["file"]) && exists(unit["file"]["config"]["mount"])) {
goodname = systemd_make_mountunit(unit["file"]["config"]["mount"]["Where"]);
if(goodname != name) {
error('Incorrect name for mount unit, the name must match Where: %s vs %s', name, goodname);
};
};
};
};
Expand Down

0 comments on commit 5f63b84

Please sign in to comment.