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

    Quick Registration Hostname Variability?

    Scheduled Pinned Locked Moved Solved
    General Problems
    3
    11
    1.3k
    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.
    • N
      neilasiii
      last edited by

      Is there a way to have variable hostnames during quick registration based on the hardware? For instance, we have Dell 7730 laptops and have recently added intel NUCs to our enterprise.

      If we wanted to quick reg the Dells as Dell-* and the Intel NUCs as NUC-* is this possible?

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

        @neilasiii With quick registration I’d have to look into the code to see if you can hack your way to what you want. In principal it should be possible.

        I have a tutorial for something similar for the full registration where the hostname is calculated based on the deployment site, if its a portable or desktop and the serial number of the device. https://forums.fogproject.org/topic/14278/creating-custom-hostname-default-for-fog-man-reg

        In this post I call for the product name differently based on the manufacturer. https://forums.fogproject.org/post/82600 This is done via a call to dmidecode to get the system-manufacturer name with dmidecode -s system-manufacturer

        So all of the bits are available you just need to configure them in the right order.

        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!

        D 1 Reply Last reply Reply Quote 0
        • D
          DBCountMan @george1421
          last edited by DBCountMan

          @george1421 These are scripts that run during registration right?

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

            @brakcounty For the custom host name yes. In the FOS Linux environment the fog.man.reg script is for registering the client computer with the FOG server. The tutorial I linked is how to inject a tweaked fog.man.reg script into a booting FOS Linux image.

            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!

            D 1 Reply Last reply Reply Quote 0
            • D
              DBCountMan @george1421
              last edited by

              @george1421 ok so I have created two files fog.man.reg and fog.customhostname containing their respective code as per your tutorial. I see this step “we need to copy the fixed fog.man.reg and (fog.auto.reg) file(s)”. Do I need to worry about the fog.auto.reg file or is the fog.man.reg file enough?

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

                @brakcounty said in Quick Registration Hostname Variability?:

                Do I need to worry about the fog.auto.reg file or is the fog.man.reg file enough?

                the fog.auto.reg is for the quick registration function. The fog.man.reg is for the full/complete registration.

                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!

                D 1 Reply Last reply Reply Quote 0
                • D
                  DBCountMan @george1421
                  last edited by

                  @george1421
                  So I got it working. The only thing I’d like to omit from the script is the site code function. I only need the serial number to be read from bios and set as hostname. Which parts of the script can I comment out to skip that step?

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

                    @brakcounty said in Quick Registration Hostname Variability?:

                    So I got it working. The only thing I’d like to omit from the script is the site code function.

                    In the custom host name script at the very bottom.

                    # default host name is returned to the fog.man.reg script
                    host_default_name="$zsitecode$zchtype$zserialno";
                    

                    That is where I glue together all of the variables that I collected above. If you just want the serial number then the last line should look like this

                    # default host name is returned to the fog.man.reg script
                    host_default_name="$zserialno";
                    

                    Then the default host name will just be the serial number of the device.

                    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!

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      DBCountMan @george1421
                      last edited by

                      @george1421 BOOM! That worked! Thanks!

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

                        @brakcounty said in Quick Registration Hostname Variability?:

                        BOOM! That worked! Thanks!

                        I’m detecting a hint of doubt in that statement…

                        Well done on the hack to get what you needed.

                        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!

                        D 1 Reply Last reply Reply Quote 0
                        • D
                          DBCountMan @george1421
                          last edited by

                          @george1421 There wasn’t any doubt on my end…but I can imagine you read that and said to yourself “of course it did…”.

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

                          151

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project