6 if (len(sys.argv) < 2):
7 print "Usage: %s <address> [netmask]" % (sys.argv[0])
10 bus = dbus.SystemBus()
12 manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
13 'org.moblin.connman.Manager')
15 properties = manager.GetProperties()
17 for path in properties["Services"]:
18 service = dbus.Interface(bus.get_object('org.moblin.connman', path),
19 'org.moblin.connman.Service')
21 properties = service.GetProperties()
23 print "Setting address %s for %s" % (sys.argv[1], path)
26 service.SetProperty("IPv4.Configuration",
27 { "Method": "manual", "Address": sys.argv[1],
28 "Netmask": sys.argv[2] })
30 service.SetProperty("IPv4.Configuration",
31 { "Method": "manual", "Address": sys.argv[1] })