blob: d912c88bb2115f10cf39fc51c50894994a81fb69 [file] [log] [blame]
#!/usr/bin/python
import sys
import dbus
def print_usage():
print "Usage: %s <service> <target service>" % (sys.argv[0])
if (len(sys.argv) < 2):
print_usage()
sys.exit(1)
bus = dbus.SystemBus()
path = "/net/connman/service/" + sys.argv[1]
service = dbus.Interface(bus.get_object('net.connman', path),
'net.connman.Service')
path2 = "/net/connman/service/" + sys.argv[2]
service2 = dbus.Interface(bus.get_object('net.connman', path2),
'net.connman.Service')
print "Moving %s before %s" % (sys.argv[1], sys.argv[2])
service.MoveBefore(service2)
print