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

    shutdown after image with postdownloadscripts

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    7
    2.0k
    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.
    • A
      abos_systemax
      last edited by

      Hello foggers!
      Fog normally reboots a machine after partclone; however: this is unwanted behavior for me because I need some control over that.
      I’ve tried a postdownloadscript like the one below:

      #!bin/sh
      shutdown -h now

      and
      #!bin/bash
      shutdown -h now

      but the FOS reports that the ‘shutdown’ command is unknown.
      I am still kind of new to Linux, but I guess that this command isnt a part of the kernel?

      However; the machine reboots… so there must be some kind of option available?

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

        While I don’t have an immediate answer for you, I would go about it this way.

        As a test, setup a debug download to a test computer. Then deploy to a test system. This debug deploy will drop you to the command prompt on the target computer, but you will be inside the FOS client. FOS is a custom linux OS specifically built for speed. It may not have the shutdown command in the inits or it uses a different command to restart a the target computer. I would start this way to investigate what tools are included.

        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

          When you create the tasking, you can choose to have the system shutdown when complete.

          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

          george1421G A 2 Replies Last reply Reply Quote 3
          • Tom ElliottT
            Tom Elliott
            last edited by

            This is important because postdownload scripts occurs BEFORE the task is completed in the database.

            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 1
            • george1421G
              george1421 Moderator @Tom Elliott
              last edited by

              @Tom-Elliott said :

              When you create the tasking, you can choose to have the system shutdown when complete.

              I was thinking there was a built in option for this!! But I don’t have immediate access to the console to confirm.

              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
              • A
                abos_systemax @Tom Elliott
                last edited by abos_systemax

                @Tom-Elliott
                O my… this was so hidden in plain sight that I never noticed the gigantic underlined ’ Shutdown’ just staring at me…

                This is why I ask my questions on the forums; you guys are just awsome.

                1 Reply Last reply Reply Quote 1
                • S
                  Sebastian Roth Moderator
                  last edited by

                  Tom is absolutely right about shutdown before the job actually finishes is not a good idea.

                  But just in case people want to do other things in the postdownloadscript and run into the same “command is unknown” issue. My guess is that the PATH environment is not properly set within the scripts. So you’d need to call /sbin/shutdown to make it work…

                  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 3
                  • 1 / 1
                  • First post
                    Last post

                  230

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project