diff options
author | Roy Marples <roy@marples.name> | 2009-11-14 08:37:05 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-11-14 08:37:05 +0000 |
commit | 509e34d425d28998ca8f6f230cadc05bc89d2731 (patch) | |
tree | d462077de383292b92c18e377dde357bff24f2b6 /src | |
parent | 0de1d18d41950dc36a0c38ff5bf0ef0fc5c73801 (diff) |
Only allow one service to be provided by default.
Fixes Gentoo #293139.
Diffstat (limited to 'src')
-rw-r--r-- | src/librc/librc-depend.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c index ef82512a..765f5958 100644 --- a/src/librc/librc-depend.c +++ b/src/librc/librc-depend.c @@ -346,8 +346,9 @@ get_provided(const RC_DEPINFO *depinfo, const char *runlevel, int options) get_provided1(runlevel, providers, dt, bootlevel, false, RC_SERVICE_STOPPED)) return providers; - /* Still nothing? OK, list all services */ - TAILQ_FOREACH(service, dt->services, entries) + /* Still nothing? OK, list our first provided service. */ + service = TAILQ_FIRST(dt->services); + if (service != NULL) rc_stringlist_add(providers, service->value); return providers; |