[PATCH skeleton] Wait for init done before claiming bus name

OpenBMC Patches openbmc-patches at stwcx.xyz
Tue May 3 14:10:56 AEST 2016


From: Brad Bishop <bradleyb at fuzziesquirrel.com>

Wait for initialization to complete before claiming a well known
bus name.  This allows other applications to use a NameOwnerChanged
signal as an indication that service initialization has completed.
---
 bin/inventory_items.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/inventory_items.py b/bin/inventory_items.py
index 0a90569..e0351a8 100755
--- a/bin/inventory_items.py
+++ b/bin/inventory_items.py
@@ -79,7 +79,6 @@ def getVersion():
 if __name__ == '__main__':
     dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
     bus = Openbmc.getDBus()
-    name = dbus.service.BusName(DBUS_NAME,bus)
     mainloop = gobject.MainLoop()
     obj_parent = Inventory(bus, '/org/openbmc/inventory')
 
@@ -94,6 +93,7 @@ if __name__ == '__main__':
 		version = getVersion()
 		obj.update({'version': version})
 
+    name = dbus.service.BusName(DBUS_NAME,bus)
     print "Running Inventory Manager"
     mainloop.run()
 
-- 
2.8.1




More information about the openbmc mailing list