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

    Use serial number as hostname in Fog

    Scheduled Pinned Locked Moved FOG Problems
    27 Posts 4 Posters 3.0k Views
    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.
    • george1421G
      george1421 Moderator @Xinzo
      last edited by

      @xinzo well done! Now just make sure you backup everything since you hacked the fog environment. That way when/if you upgrade you don’t lose your hacks. But really nice. I’m really more than willing to help someone help themselves success with FOG. This way you can get exactly what works for your situation.

      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!

      X 1 Reply Last reply Reply Quote 0
      • X
        Xinzo @george1421
        last edited by

        Thanks 😁
        For people who want to do this. Don’t forget to set the QUICKREG SYS NAME in the FOG SETTINGS to SYSSERIAL.
        @george1421 Can I upload my file somewere for the people who want to implement the feature ?

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

          @xinzo If you want to post them here, I’ll rewrite the instructions as a tutorial and then provide a link to this thread. You might need to change the extension of the files to .txt so they can be uploaded. I can see other wanting this feature too. I know I personally missed it since the FOG v0.30 days.

          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!

          X A 2 Replies Last reply Reply Quote 0
          • X
            Xinzo @george1421
            last edited by

            @george1421
            Here are my files, I’ve upload all the content of my postinitscripts folder:
            fog.postinit.txt
            fog.patch.customhostname.txt
            fog.man.reg.fix.txt
            fog.customhostname.txt
            fog.auto.reg.txt

            @george1421 said in Use serial number as hostname in Fog:

            I can see other wanting this feature too. I know I personally missed it since the FOG v0.30 days.

            Without you, impossible to implement this feature. Thanks a lot

            1 Reply Last reply Reply Quote 1
            • A
              AlexisPHC @george1421
              last edited by

              @george1421 did you ever get round to writing a guide for this? It’s a shame this can’t be included in the main branch for quick registration, because we just name machines off the system serial number here and you have to pay extra now for a bloomin barcode with Dell!

              Tom ElliottT george1421G 2 Replies Last reply Reply Quote 0
              • Tom ElliottT
                Tom Elliott @AlexisPHC
                last edited by

                @AlexisPHC You can set this by putting the name field of quick registration as {SYSSERIAL}

                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

                A 1 Reply Last reply Reply Quote 0
                • A
                  AlexisPHC @Tom Elliott
                  last edited by

                  @Tom-Elliott said in Use serial number as hostname in Fog:

                  {SYSSERIAL}

                  Ah, lovely, thanks Tom, I’ll give that a go - I tried SYSSERIAL on it’s own and it didn’t work but didn’t realise it needed the curly brackets!

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

                    @AlexisPHC said in Use serial number as hostname in Fog:

                    did you ever get round to writing a guide for this?

                    Yes. I think the previous comment to your post referenced the files.

                    https://forums.fogproject.org/topic/14278/creating-custom-hostname-default-for-fog-man-reg?_=1762381023512

                    the file fog.customhostname uses a linux command dmidecode to extract the serial number from the smbios. And the rest of the ‘hack’ will pump that name into the full registration files. When I wrote that script I worked for a company that had a composite host name with the site code, a hardware type and then the dell asset tag appended onto the end. That is what this tutorial shows.

                    Now Tom mentioned that {SYSSERIAL} in the quick registration field works too. I wasn’t aware of that feature, it must be new. I know FOG version 0.30 had that feature but it was removed when FOG 1.x was released. If its back, that’s great!! that makes my script(s) unnecessary.

                    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!

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      AlexisPHC @george1421
                      last edited by

                      @george1421 I’ll give that guide a whirl, {SYSSERIAL} doesn’t seem to work - this is what happened when I tried it!

                      eb2e2ec9-17e7-4980-8ddd-65ca16dcfff8-image.png

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

                        @AlexisPHC I’m apologizing, yes SYSSERIAL is existing (in working-1.6).

                        If you’re willing (and slightly daring) you could update to the working-1.6 branch (give us another tester of it) and SYSSERIAL is re-introduced overthere.

                        I am workign with 2 different systems and often look in the primary place I’m working to find information. I can assure you the SYSSERIAL lookup/adjustment is in the working-1.6 branch (and that just happened to be where I was when I looked this up so again my apologies)

                        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

                        A 2 Replies Last reply Reply Quote 0
                        • A
                          AlexisPHC @Tom Elliott
                          last edited by

                          @Tom-Elliott aha, that explains it, I installed the stable branch and I’m on 1.5.10. Guess I need to upgrade then to working-1.6!

                          1 Reply Last reply Reply Quote 0
                          • A
                            AlexisPHC @Tom Elliott
                            last edited by

                            @Tom-Elliott can confirm, this does now appear to work in 1.6 - huzzah! @george1421 looks like your hard work has paid off and it will eventually be in the stable branch!

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

                            193

                            Online

                            12.4k

                            Users

                            17.4k

                            Topics

                            155.9k

                            Posts
                            Copyright © 2012-2025 FOG Project