• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • 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.
  • G
    george1421 Moderator @neilasiii
    last edited by Sep 2, 2021, 12:16 AM

    @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 Oct 12, 2021, 7:28 PM Reply Quote 0
    • D
      DBCountMan @george1421
      last edited by DBCountMan Oct 12, 2021, 1:37 PM Oct 12, 2021, 7:28 PM

      @george1421 These are scripts that run during registration right?

      G 1 Reply Last reply Oct 12, 2021, 7:54 PM Reply Quote 0
      • G
        george1421 Moderator @DBCountMan
        last edited by Oct 12, 2021, 7:54 PM

        @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 Oct 12, 2021, 8:13 PM Reply Quote 0
        • D
          DBCountMan @george1421
          last edited by Oct 12, 2021, 8:13 PM

          @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?

          G 1 Reply Last reply Oct 12, 2021, 9:25 PM Reply Quote 0
          • G
            george1421 Moderator @DBCountMan
            last edited by Oct 12, 2021, 9:25 PM

            @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 Oct 13, 2021, 5:28 PM Reply Quote 0
            • D
              DBCountMan @george1421
              last edited by Oct 13, 2021, 5:28 PM

              @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?

              G 1 Reply Last reply Oct 13, 2021, 5:58 PM Reply Quote 0
              • G
                george1421 Moderator @DBCountMan
                last edited by Oct 13, 2021, 5:58 PM

                @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 Oct 13, 2021, 7:22 PM Reply Quote 0
                • D
                  DBCountMan @george1421
                  last edited by Oct 13, 2021, 7:22 PM

                  @george1421 BOOM! That worked! Thanks!

                  G 1 Reply Last reply Oct 13, 2021, 9:40 PM Reply Quote 0
                  • G
                    george1421 Moderator @DBCountMan
                    last edited by Oct 13, 2021, 9:40 PM

                    @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 Oct 14, 2021, 1:17 PM Reply Quote 0
                    • D
                      DBCountMan @george1421
                      last edited by Oct 14, 2021, 1:17 PM

                      @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

                      207

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project