diff options
author | Tomas Bzatek <tbzatek@redhat.com> | 2013-05-27 19:46:48 +0200 |
---|---|---|
committer | Tomas Bzatek <tbzatek@redhat.com> | 2013-05-27 19:46:48 +0200 |
commit | de1c51249a449663f72cdfa26d852ba33b106330 (patch) | |
tree | 9899ba35f09fbb9f3cef3e1b1e1ced6d83094c3b /src/service-dbus/util/serviceutil.c | |
parent | e092a50e5e9445ab3e5a894903395032cabeef56 (diff) | |
download | openlmi-providers-de1c51249a449663f72cdfa26d852ba33b106330.tar.gz openlmi-providers-de1c51249a449663f72cdfa26d852ba33b106330.tar.xz openlmi-providers-de1c51249a449663f72cdfa26d852ba33b106330.zip |
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
Diffstat (limited to 'src/service-dbus/util/serviceutil.c')
-rw-r--r-- | src/service-dbus/util/serviceutil.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |