diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-01 21:30:40 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-01 21:30:40 +0200 |
commit | bd77d0fccccb7c94d1dd52d2e535feb7156e3220 (patch) | |
tree | 03b1adf7be6bcdc6db5be89bc5170a430092987c /unit.c | |
parent | dbd4655d8937fb870a6ec42889081ecd4b83ca98 (diff) |
sysv: properly handle Provides LSB header
Diffstat (limited to 'unit.c')
-rw-r--r-- | unit.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -978,6 +978,19 @@ int unit_add_dependency_by_name(Unit *u, UnitDependency d, const char *name) { return 0; } +int unit_add_dependency_by_name_inverse(Unit *u, UnitDependency d, const char *name) { + Unit *other; + int r; + + if ((r = manager_load_unit(u->meta.manager, name, &other)) < 0) + return r; + + if ((r = unit_add_dependency(other, d, u)) < 0) + return r; + + return 0; +} + int set_unit_path(const char *p) { char *cwd, *c; int r; |