From 509e34d425d28998ca8f6f230cadc05bc89d2731 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 14 Nov 2009 08:37:05 +0000 Subject: Only allow one service to be provided by default. Fixes Gentoo #293139. --- src/librc/librc-depend.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3