mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 00:08:32 +01:00
20 lines
703 B
Diff
20 lines
703 B
Diff
Ignore duplicate paths in "systemctl start".
|
|
|
|
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
|
index a4290c4..d3ac3ad 100644
|
|
--- a/src/systemctl/systemctl.c
|
|
+++ b/src/systemctl/systemctl.c
|
|
@@ -1596,8 +1596,11 @@ static int start_unit_one(
|
|
|
|
r = set_put(s, p);
|
|
if (r < 0) {
|
|
- log_error("Failed to add path to set.");
|
|
- return r;
|
|
+ free(p);
|
|
+ if (r != -EEXIST) {
|
|
+ log_error("Failed to add path %s to set.", p);
|
|
+ return r;
|
|
+ }
|
|
}
|
|
|
|
p = NULL;
|