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

    Question(s) about fog.updateunattend post download script

    FOG Problems
    2
    3
    59
    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

      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

      george1421 1 Reply Last reply Reply Quote 0
      • B
        bofh @george1421 last edited by

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

        1 Reply Last reply Reply Quote 0
        • george1421
          george1421 Moderator @bofh last edited by

          @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 Reply Quote 0
          • 1 / 1
          • First post
            Last post

          78
          Online

          10.4k
          Users

          16.4k
          Topics

          150.5k
          Posts

          Copyright © 2012-2023 FOG Project