summaryrefslogtreecommitdiffstats
path: root/src/service-dbus
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2013-05-27 19:46:48 +0200
committerTomas Bzatek <tbzatek@redhat.com>2013-05-27 19:46:48 +0200
commitde1c51249a449663f72cdfa26d852ba33b106330 (patch)
tree9899ba35f09fbb9f3cef3e1b1e1ced6d83094c3b /src/service-dbus
parente092a50e5e9445ab3e5a894903395032cabeef56 (diff)
downloadopenlmi-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')
-rw-r--r--src/service-dbus/util/serviceutil.c3
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;