You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
303 B
11 lines
303 B
local io = require("io")
|
|
local serial = require("serialization")
|
|
local dhcp = require("dhcp")
|
|
|
|
local pkt = dhcp.query()
|
|
print("Received response from "..pkt.raddr)
|
|
|
|
print("Writing to /etc/resolv.cfg")
|
|
local f = io.open("/etc/resolv.cfg", "w")
|
|
f:write(serial.serialize(pkt.data[2],5))
|
|
f:close()
|