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

Create a new boottask hook

Scheduled Pinned Locked Moved Solved
FOG Problems
2
8
1.6k
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.
  • C
    csa
    last edited by Jun 2, 2016, 1:49 PM

    Hi,
    This is a followup ticket
    https://forums.fogproject.org/topic/7448/adding-custom-task-to-fog-server

    Original ticket is resolved. Now I am trying to create the same boottask for multiple OS installations. As per the Tom’s instructions

    1. Created a new file “boottasktrusty.hook.php” copy of “boottask.hook.php”

    2. Updated the class name, $name and $Tastype to new name.

    root@fogsrv:/var/www/fog/lib/hooks# sdiff -s boottask.hook.php boottasktrusty.hook.php
    class BootTask extends Hook { | class BootTaskTrusty extends Hook {
    public $name = ‘BootTask’; | public $name = ‘BootTaskTrusty’;
    public $active = False; | public $active = True;

    When trying to pxe install. It complains on “Unknown reqeust type NULL” . Do I need to add the new file name anywhere else?

    Thank you
    Chakri

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Jun 2, 2016, 2:01 PM

      Your hook is not enacting properly.

      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

      C 3 Replies Last reply Jun 2, 2016, 2:09 PM Reply Quote 0
      • C
        csa @Tom Elliott
        last edited by Jun 2, 2016, 2:09 PM

        @Tom-Elliott
        Didn’t understand. What is the fix? Do you have few minutes to chat?

        1 Reply Last reply Reply Quote 0
        • C
          csa
          last edited by Jun 3, 2016, 3:41 PM

          Tom,
          The default boottask.hook.php works without any issues. The new one fails still. Any ideas?

          From the error logs 
          [06-03-16 3:36:04 pm]  * No tasks found!
          From the console 
          Fatal Error : Uknown request type : : Null
          

          root@fogsrv:/var/www/html/fog/lib/hooks# diff boottask.hook.php boottasktrusty.hook.php
          2,3c2,3

          <     public $name = 'BootTask';
          ---
          > class BootTasktrusty extends Hook {
          >     public $name = 'BootTasktrusty';
          9c9
          <         $TaskType = self::getClass('TaskType')->set('name','trusty-install')->load('name');
          ---
          >         $TaskType = self::getClass('TaskType')->set('name','trusty123-install')->load('name');
          

          Thank you
          Chakri

          1 Reply Last reply Reply Quote 0
          • C
            csa @Tom Elliott
            last edited by Jun 6, 2016, 9:33 PM

            @Tom-Elliott
            Tom any updates?

            Thank you
            Chakri

            1 Reply Last reply Reply Quote 0
            • C
              csa @Tom Elliott
              last edited by Jun 9, 2016, 2:30 PM

              @Tom-Elliott

              Morning Tom,
              I Also noticed one more thing.

              1. Any changes made within the “boottask.hook.php” are working. I was able to install different flavor of OS by changing the caller name.

              2. Looks like the application is only looking for file name “boottask.hook.php”.

              Thank you
              Chakri

              T 1 Reply Last reply Jun 9, 2016, 2:35 PM Reply Quote 0
              • T
                Tom Elliott @csa
                last edited by Jun 9, 2016, 2:35 PM

                @csa The hooks work on a register. So if the register part isn’t aligned the hook won’t interact with anything.

                Normally, the last line or lines of the file contain the register examples. My guess is they’re referencing the old class names?

                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

                C 1 Reply Last reply Jun 9, 2016, 3:01 PM Reply Quote 1
                • C
                  csa @Tom Elliott
                  last edited by Jun 9, 2016, 3:01 PM

                  @Tom-Elliott

                  That resolved the issue. Thank you so much for the time. Please resolve this ticket.

                  Thank you
                  Chakri

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

                  239

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project