gdhcp: Set client state to INIT_SELECTING on restart
[platform/upstream/connman.git] / test / set-domains
1 #!/usr/bin/python
2
3 import sys
4 import dbus
5
6 if (len(sys.argv) < 2):
7         print "Usage: %s <service> [domain*]" % (sys.argv[0])
8         sys.exit(1)
9
10 bus = dbus.SystemBus()
11 path = "/net/connman/service/" + sys.argv[1]
12 service = dbus.Interface(bus.get_object('net.connman', path),
13                                         'net.connman.Service')
14
15 properties = service.GetProperties()
16
17 print "Setting domains to %s" % (sys.argv[2:])
18
19 service.SetProperty("Domains.Configuration", 
20         dbus.Array(sys.argv[2:], signature=dbus.Signature('s')))