From de1c51249a449663f72cdfa26d852ba33b106330 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 27 May 2013 19:46:48 +0200 Subject: service-dbus: Ignore instantiable services It seems there's no way how to load instantiable unit file that is not active (i.e. not instantiated) in order to get its properties. Let's ignore such services for the moment to be able to enumerate instances. https://fedorahosted.org/openlmi/ticket/114 --- src/service-dbus/util/serviceutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/service-dbus') diff --git a/src/service-dbus/util/serviceutil.c b/src/service-dbus/util/serviceutil.c index 32bd76a..685f7a7 100644 --- a/src/service-dbus/util/serviceutil.c +++ b/src/service-dbus/util/serviceutil.c @@ -93,7 +93,8 @@ SList *service_find_all(void) g_variant_get(result, "(a(ss))", &arr); while (g_variant_iter_loop(arr, "(ss)", &primary_unit_name, NULL)) { - if (strstr(primary_unit_name, ".service")) { + /* Ignore instantiable units (containing '@') until we find out how to properly present them */ + if (strstr(primary_unit_name, ".service") && strchr(primary_unit_name, '@') == NULL) { tmps = strdup(primary_unit_name); if (!tmps) continue; -- cgit