Add simple script to show the master state
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 7 Apr 2008 02:26:38 +0000 (04:26 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 7 Apr 2008 02:26:38 +0000 (04:26 +0200)
test/Makefile.am
test/get-state [new file with mode: 0755]

index 21ceba6..d563812 100644 (file)
@@ -1,5 +1,5 @@
 
 EXTRA_DIST = list-interfaces start-scanning select-network simple-agent \
-                                       show-introspection test-supplicant
+                               get-state show-introspection test-supplicant
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/test/get-state b/test/get-state
new file mode 100755 (executable)
index 0000000..e5b130c
--- /dev/null
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.freedesktop.connman', "/"),
+                                       'org.freedesktop.connman.Manager')
+
+state = manager.GetState()
+
+print "System is %s" % (state)