OpenComputers Von Neumann Machine Programs
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.

10 lines
303 B

2 years ago
  1. local io = require("io")
  2. local serial = require("serialization")
  3. local dhcp = require("dhcp")
  4. local pkt = dhcp.query()
  5. print("Received response from "..pkt.raddr)
  6. print("Writing to /etc/resolv.cfg")
  7. local f = io.open("/etc/resolv.cfg", "w")
  8. f:write(serial.serialize(pkt.data[2],5))
  9. f:close()