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

    Postdownloadscripts Requirements

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    5
    10
    2.4k
    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.
    • sudburrS
      sudburr
      last edited by

      Server
      • FOG Version: RC37
      • OS: CentOS 7.2.1511
      Client
      • Service Version: 0.11.7
      • OS: Windows
      Description

      When exactly do Postdownloadscripts run?

      What is required on a Windows host / FOG server for Postdownloadscripts to work?

      [ Standing in between extinction in the cold and explosive radiating growth ]

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        There’s 0 requirement on WIndows Hosts. Post download scripts from from the “fos” init engine. They’re nothing more than shell scripts that perform actions.

        What you do with them is totally up to you.

        Requirement on the server, I suppose, is just to have the postdownloadscripts folder and call them how you require them within the fog.postdownload script.

        Really, you can just code everything you want directly in the fog.postdownload script (but that can be messy if you are doing a lot of things with these scripts.)

        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • sudburrS
          sudburr
          last edited by

          Is there any control on which Postdownloadscripts the FOS init engine runs post-imaging or does it simply and only run the script ‘fog.postdownload’ universally after any imaging on any host?

          Is the Postdownloadscripts (fog.postdownload) run by a ‘Deploy Image’ action that is invoked locally at the host or is it just referenced when imaging through the FOG Web GUI?

          [ Standing in between extinction in the cold and explosive radiating growth ]

          Tom ElliottT 1 Reply Last reply Reply Quote 0
          • sudburrS
            sudburr
            last edited by

            Looking at the FOG Wiki for more answers, but it has only three pages that use the word ‘Postdownloadscripts’ and only one of those, ‘Auto driver install’, is actually about using it.

            Unfortunately that page, ‘Auto driver install’, says it requires two files at a login-barred external site to work.

            [ Standing in between extinction in the cold and explosive radiating growth ]

            george1421G 1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott @sudburr
              last edited by

              @sudburr It’s only referenced in the inits. The control is only handled by the person who creates the scripts.

              It is called on EVERY deploy tasking.

              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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

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

                @sudburr To repeat what Tom said.

                The fog.postdownload script gets called on each deployment. This is the master script where the deployment admin can choose what happens, its a bit of an external hook into the deployment process. The important thing to remember here is the fog.postdownload script runs from the FOS engine (from the perspective of the target computer). If you need access to resources you need to mount them in your fog post install script. Be it local disk or nfs mounts back to the fog server. The post download scripts must be programmed in bash to execute on the target computer. This is linux so you may not run any windows commands in the post install scripts like DISM.exe.

                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!

                1 Reply Last reply Reply Quote 0
                • Tom ElliottT
                  Tom Elliott
                  last edited by

                  As I think the main information has been discussed and the originating question has been solved, I’ve gone ahead and done that to the “status”.

                  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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 0
                  • Wayne WorkmanW
                    Wayne Workman
                    last edited by

                    To build your scripts, you would work in debug mode and get them pieced together in there, then save them to the server from there. While in debug mode, you can get a listing of all variables with printenv and also George worked hard to get some more data exposed to the FOS engine.

                    Even though fog.postdownload runs for every deploy, you can within your script create conditionals for only this computer or that model and so on.

                    A popular use is to place driver files in the needed spot.

                    Other uses might include - putting specific installers onto the 😄 volume, placing configuration files for software, or as George does, modifying existing files on the disk like the unattend.xml file to set within it the proper computer name among other things.

                    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!
                    Daily Clean Installation Results:
                    https://fogtesting.fogproject.us/
                    FOG Reporting:
                    https://fog-external-reporting-results.fogproject.us/

                    1 Reply Last reply Reply Quote 0
                    • Q
                      Quazz Moderator
                      last edited by

                      If you want certain things to run on only certain hosts, you need to either create a very intelligent script or use snapins which are already designed for that.

                      Wayne WorkmanW 1 Reply Last reply Reply Quote 1
                      • Wayne WorkmanW
                        Wayne Workman @Quazz
                        last edited by

                        @Quazz yeah, I just use snapins because it’s easier. Click click click and the exact group I’m targeting has the needed snapin assigned.

                        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!
                        Daily Clean Installation Results:
                        https://fogtesting.fogproject.us/
                        FOG Reporting:
                        https://fog-external-reporting-results.fogproject.us/

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

                        217

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project