From bd77d0fccccb7c94d1dd52d2e535feb7156e3220 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 1 Apr 2010 21:30:40 +0200 Subject: sysv: properly handle Provides LSB header --- unit.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'unit.c') diff --git a/unit.c b/unit.c index 673aac184f..036c01648c 100644 --- a/unit.c +++ b/unit.c @@ -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; -- cgit v1.2.3-54-g00ecf