SnapIn How-to questions in regards to hosts file.

  • Server
    • FOG Version: 1.3.0 RC 21
    • OS: Centos7
    • Service Version: 0.11.5
    • OS: Windows7

    I read through the Wiki on SnapIns and there is no clear guide on how to create them. I appeal to your collective expertise. How would I create a SnapIn to replace or append to the windows hosts file?

  • Moderator

    as for updating your host file something as simple as
    echo " fog_server" >> c:\windows\system32\drivers\etc\hosts in a batch script should add the reference to the host file.
    If you have a number of entries saved in a text file you could use something like type hupdate.txt >> c:\windows\system32\drivers\etc\hosts to update the file.

    Disclaimer: I have not tested the commands above, they just came to me as I was typing, so YMMV.

  • Senior Developer

    @AngryScientist a snapin is just a way of executing any file, it can be whatever you want. Make something that when run updates the host file(e.g. a batch or powershell script). Then just use the snapin template matching your script type.

Log in to reply





Looks like your connection to FOG Project was lost, please wait while we try to reconnect.