• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Question(s) about fog.updateunattend post download script

Scheduled Pinned Locked Moved
FOG Problems
2
3
230
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    bofh
    last edited by May 26, 2022, 7:41 PM

    Hi all,

    I’m working on integrating an AD join for newly imaged systems using the fog.updateunattend example script found in the holy scripture.

    I see some of the variables used in the script aren’t defined, so I’m curious as to where there definitions come from. Specifically, $aduser, $adou, and $addomain

    Are these values assumed to already be in the unattend file prior to dynamically updating the hostname? Or is there something I am missing here?

    I’m assuming those variables should be defined at the start of the script otherwise…

    Anyone using this script or a derivative in production?

    Thanks,

    the bofh

    G 1 Reply Last reply May 26, 2022, 9:05 PM Reply Quote 0
    • G
      george1421 Moderator @bofh
      last edited by May 26, 2022, 9:05 PM

      @bofh There is a prequel article to the one you linked with a lot of useful information here: https://forums.fogproject.org/topic/7740/the-magical-mystical-fog-post-download-script

      More to your point FOG preloads some variables into the post install script environment for use. At the bottom of the tutorial linked above I show how to uses a curl call to grab more values if needed.

      If you want to see what variables are available during the post install script you can do a little bit of hacking to get your answer.

      In the fog.postdownload script add in the following lines at the end of the script as delivered from FOG.

      echo "Hey I'm about to run a post install script, please stop me"
      debugPause
      

      Now schedule a debug deployment. Just before you hit the schedule task button tick the debug checkbox.

      Now pxe boot the target computer. After several screens of text you need to clear with the enter key you will be dropped to the fos linux command prompt. At the fos linux command prompt key in fog to start imaging in single step mode. When you see the “Hey I’m about to run a post install script…” press ctrl-C. This is the environment where you post install script would run. Key in set |more to see the variables available to you.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

      B 1 Reply Last reply May 27, 2022, 7:01 PM Reply Quote 0
      • B
        bofh @george1421
        last edited by May 27, 2022, 7:01 PM

        @george1421 Thank you so much! That article helped immensely.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post

        239

        Online

        12.0k

        Users

        17.3k

        Topics

        155.2k

        Posts
        Copyright © 2012-2024 FOG Project