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

    Auto registration for unregistered hosts with Quick registration and invetory

    Scheduled Pinned Locked Moved
    Tutorials
    7
    29
    14.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.
    • ?
      A Former User
      last edited by

      Sorry for the wall in advance. I actually was looking for this feature myself, looked at the Quick Registration Auto Population but found it didnt auto reg if something wasnt registered. I eventually figured it out and made the modification myself. If someone could provide some feedback on this, that would be great. Basically what I did was use the Host Is Valid check to make an if statement to choose between to variable = “” statements. This was all done in the BootMenu.class.php file right at line 138, might be different for you, I have FOG 1.2.0. This does require Auto Population to be turned on and configured to your specifications so as to properly fill out the sequential naming.

      Attached is a screenshot of what it looks like for me. I’m sure this could be more appropriately coded, but I’m not the best at php.

      TOM, If this isn’t already included, maybe we could add this and give it an on/off button in the webui?

      Note: “DESTRUCTIVE: This will forcefully register and image ANY computer that is booted via PXE and isn’t already registered. I do not recommend this at all for a production network. Use with caution in a secure deployment network.”

      [PHP]
      ####Add this
      if ($this->Host && $this->Host->isValid()){
      $defchoice2 = “choose --default fog.local --timeout $timeout target && goto ${target}\n”;
      }ELSE{
      $defchoice2 = “choose --default fog.reg --timeout $timeout target && goto ${target}\n”;
      }
      ####Don’t touch this

                  if ($Advanced)
                          $this->pxemenu['fog.advanced'] = 'Advanced Menu';
                  $this->memdisk = "kernel $memdisk";
                  $this->memtest = "initrd $memtest";
                  $this->kernel = "kernel $bzImage root=/dev/ram0 rw ramdisk_size=$ramsize ip=dhcp dns=$dns keymap=$keymap web=${webserver}${webroot} consoleblank=0 ";
                  $this->initrd = "imgfetch $imagefile\n";
      

      ####Modify this
      $this->defaultChoice = “$defchoice2”;
      ####[/PHP]

      [url=“/_imported_xf_attachments/1/1788_Screenshot 2015-03-15 14.17.35.png?:”]Screenshot 2015-03-15 14.17.35.png[/url]

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

        This already exists for dev fog.

        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
        • ?
          A Former User
          last edited by

          Ahh, OK. I probably didn’t look hard/long enough. I am really good at missing information that’s right in front of me. I just got started with FOG last week and I must say I’m thoroughly impressed with it.

          1 Reply Last reply Reply Quote 0
          • M
            mrzo
            last edited by

            So, the solution could be install the trunk version?

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

              In as simple terms as possible, yes!

              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
              • M
                mrzo
                last edited by

                Is it possible to shutdown computer after auto populating with given image instead of restarting (and booting from HD)?

                1 Reply Last reply Reply Quote 0
                • Joseph HalesJ
                  Joseph Hales Testers
                  last edited by

                  It should be possible to customize your fog to allow for this but its not settable in fog you would have to see how the web gui does it when you manually deploy an image and check the shutdown after task box.

                  RTFM

                  1 Reply Last reply Reply Quote 0
                  • M
                    mrzo
                    last edited by

                    Have som problems with Fog - some computers don’t register correctly and when I checked the database, the host is registered with hostID 0 - related MAC address is in the table hostMAC (with hostID 0) but host is not showing in hosts list, and is not recognised as registered. Using older trunk version 3153.

                    When I manualy delete these two records from database, host register correctly. I have only two PC with thos problem and dont know why these two.

                    1 Reply Last reply Reply Quote 0
                    • M
                      mrzo
                      last edited by

                      Just had third case - notice message “Host is not valid.” instead of “Done, with imaging”. Again delete from database, and host regiter succefully through automatic Quick registration.

                      1 Reply Last reply Reply Quote 0
                      • Joseph HalesJ
                        Joseph Hales Testers
                        last edited by

                        I think this was addressed in a later SVN.

                        RTFM

                        1 Reply Last reply Reply Quote 0
                        • M
                          mrzo
                          last edited by

                          OK, I’ll try update to latest trunk.

                          1 Reply Last reply Reply Quote 0
                          • M
                            mrzo
                            last edited by

                            Often when I update to the newest trunk I cannot change Fog Settings from web page (end in blank page, setting not changed, I must edit it directly in DB). Is there something I can do to fix this, or just wait to another trunk which address this?

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

                              What revision and do you have Apache error logs when the white screen occurs?

                              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
                              • M
                                mrzo
                                last edited by

                                Version: 3278
                                And there was no log in apache error log file, only in access. I tried turn on PHP errors displaying and there is one fatal error:

                                [B]Fatal error[/B]: Call to undefined function mcrypt_get_iv_size() in [B]/var/www/fog/lib/fog/FOGBase.class.php[/B] on line [B]301[/B]

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

                                  Can you try 3279? The reason mcrypt_get_iv_size is failing, in my guesstimation is that my trying to keep errors from downloading the client files was what screwed this up for you. It should work better now, with any luck.

                                  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
                                  • M
                                    mrzo
                                    last edited by

                                    OK it seems for some reason mcrypt php module was installed but not enabled.
                                    Fix:
                                    php5enmod mcrypt
                                    service apache2 restart

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      mrzo
                                      last edited by

                                      [quote=“Tom Elliott, post: 45876, member: 7271”]Can you try 3279?[/quote]
                                      I installed 3279 and at least the error didn’t reappeared. Can’t tell if it fixed it as I fixed it with enabling mcrypt odule as I wrote before…

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

                                      179

                                      Online

                                      12.1k

                                      Users

                                      17.3k

                                      Topics

                                      155.4k

                                      Posts
                                      Copyright © 2012-2024 FOG Project