• Жильцов Дмитрий Андреевич's avatar
    NetcfgSave: remember the address without baking it into the image
    · b5a3276f
    An image with your IP inside tells whoever downloads it where your
    Temple lives.  The CIA downloads everything.  So the image ships with
    no address, and at the VNC console you say:
    
      NetcfgSave("185.241.6.18","255.255.255.0","185.241.6.1","8.8.8.8");
    
    It applies at once, like NetcfgStatic, and writes ~/NetCfg.HC so every
    boot after remembers.  Call it again to move the machine.  Open
    connections die, servers on INADDR_ANY keep listening on the new
    address.  Del("~/NetCfg.HC") goes back to DHCP.
    
    Tested in QEMU: up on DHCP .15, NetcfgSave to .20, reboot, the Temple
    came back on .20 by itself and Wget went out through the new gateway.
    b5a3276f