diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-10-07 14:36:57 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-10-07 14:36:57 +0200 |
commit | 6ca9fc9115f323d7358b146096994c7f2ba344b5 (patch) | |
tree | 51ac89b94c28e4943e7bd9480622abb446bbd429 /test/disable-device | |
parent | 371e8bd67cbeb37695f5b69d964a11bf0cc963b2 (diff) | |
download | connman-6ca9fc9115f323d7358b146096994c7f2ba344b5.tar.gz connman-6ca9fc9115f323d7358b146096994c7f2ba344b5.tar.bz2 connman-6ca9fc9115f323d7358b146096994c7f2ba344b5.zip |
Add scripts for enabling/disabling devices
Diffstat (limited to 'test/disable-device')
-rwxr-xr-x | test/disable-device | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/disable-device b/test/disable-device new file mode 100755 index 00000000..ac55e77a --- /dev/null +++ b/test/disable-device @@ -0,0 +1,23 @@ +#!/usr/bin/python + +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"), + 'org.moblin.connman.Manager') + +elements = manager.ListElements() + +for path in elements: + element = dbus.Interface(bus.get_object('org.moblin.connman', path), + 'org.moblin.connman.Element') + + properties = element.GetProperties() + + if (properties["Type"] != "device"): + continue + + print "[ %s ]" % (path) + + element.Disable() |