mirror of git://git.sysmocom.de/ofono
test: process-context-settings: use ip instead of ifconfig/route
This commit is contained in:
parent
17bf6ac7c0
commit
777ae04611
|
@ -41,14 +41,14 @@ for path, properties in modems:
|
||||||
print(" IP address is %s" % (address))
|
print(" IP address is %s" % (address))
|
||||||
print(" Gateway is %s" % (gateway))
|
print(" Gateway is %s" % (gateway))
|
||||||
|
|
||||||
cmd = "ifconfig " + interface + " " + address
|
cmd = "ip address add dev " + interface + " " + address
|
||||||
cmd += " netmask 255.255.255.255"
|
cmd += "/32"
|
||||||
os.system(cmd);
|
os.system(cmd);
|
||||||
|
|
||||||
for i in settings["DomainNameServers"]:
|
for i in settings["DomainNameServers"]:
|
||||||
print(" Nameserver is %s" % (i))
|
print(" Nameserver is %s" % (i))
|
||||||
|
|
||||||
cmd = "route add -host " + i
|
cmd = "ip route add " + i
|
||||||
cmd +=" dev " + interface
|
cmd +=" dev " + interface
|
||||||
os.system(cmd);
|
os.system(cmd);
|
||||||
print('')
|
print('')
|
||||||
|
|
Loading…
Reference in New Issue