Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: SUGGESTION: Specify hostname cheatcode

Hybrid View

  1. #1

    SUGGESTION: Specify hostname cheatcode

    I think that it would be great to be able to specificy the hostname that will be reqistered with the DHCP server (and, by extension) Dynamic DNS (if it is configured). Right now, the hostname is knoppix. The way our dynamic DNS is set up, conflicts between hosts with the same name result in the second one being incremented with a -<number>.

    So the first one to boot is knoppix.dhcp.example.com. The second conflicts so it is incremented as knoppix-1.dhcp.example.com and so on down the line.

    I have handed out so many knoppix discs and our DHCP leases are so long on campus that this is beginning to become a problem.

    If I just had the ability to pass the name that I would like to be registered during a bootup cheatcode, I could differentiate my system (so that I can find it when it is in server mode) more easily.

    So, Klaus (and everyone else) what do you think?

    thanks.

  2. #2
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Long Island, NY, USA
    Posts
    1,256
    I second the motion! I too would find this very useful. How about a cheat to specify a dummy IP address too? Could these setting then be saved with floppyconfig or persistant home?

    Regards,

  3. #3
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    297
    Quote Originally Posted by A. Jorge Garcia
    I second the motion! I too would find this very useful. How about a cheat to specify a dummy IP address too? Could these setting then be saved with floppyconfig or persistant home?

    Regards,
    That is already possible. If zou sue persistent home/config zou an do this.

    cu

    Fabian

  4. #4
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    297

    Re: SUGGESTION: Specificy hostname cheatcode

    Quote Originally Posted by cascadefx
    I think that it would be great to be able to specificy the hostname that will be reqistered with the DHCP server (and, by extension) Dynamic DNS (if it is configured). Right now, the hostname is knoppix. The way our dynamic DNS is set up, conflicts between hosts with the same name result in the second one being incremented with a -<number>.

    So the first one to boot is knoppix.dhcp.example.com. The second conflicts so it is incremented as knoppix-1.dhcp.example.com and so on down the line.

    I have handed out so many knoppix discs and our DHCP leases are so long on campus that this is beginning to become a problem.

    If I just had the ability to pass the name that I would like to be registered during a bootup cheatcode, I could differentiate my system (so that I can find it when it is in server mode) more easily.

    So, Klaus (and everyone else) what do you think?

    thanks.
    Thats a great idea:

    And its easy to do, in knoppix-autoconfig:

    -hostname Knoppix
    +HOSTNAME=getbootparam hostname
    +if [ -n "$HOSTNAME" ]
    +then
    + echo "$HOSTNAME" > /etc/hostname
    + hostname $HOSTNAME
    +else
    + hostname Knoppix
    +fi

    In Pseudo-Diff-Format...

    cu

    Fabian

  5. #5

    Re: SUGGESTION: Specificy hostname cheatcode

    Quote Originally Posted by Fabianx

    Thats a great idea:

    And its easy to do, in knoppix-autoconfig:

    -hostname Knoppix
    +HOSTNAME=getbootparam hostname
    +if [ -n "$HOSTNAME" ]
    +then
    + echo "$HOSTNAME" > /etc/hostname
    + hostname $HOSTNAME
    +else
    + hostname Knoppix
    +fi

    In Pseudo-Diff-Format...

    cu

    Fabian
    Thanks Fabian.

    I will try this out, but a cheatcode would be so much better. It makes the straight CD MUCH more flexible.

  6. #6
    Junior Member
    Join Date
    Aug 2003
    Posts
    1

    hostname?

    hi, i can change the hostname after booting by 'hostname whatever' as root, but it is not saved in my persistent home dir on /hda1.

    i also changed hostname in /etc/init.d/knoppix-autoconfig. that is saved after a reboot, but hostname always stays Knoppix?

    i also edited /etc/hostname which is retained through a reboot, but hostname is always Knoppix?

  7. #7
    Senior Member registered user
    Join Date
    Jun 2003
    Posts
    611
    I treid that but it wound up having no hostanme at all, guess the code needs something about checking whether a hostname cheatcode has been entered??

  8. #8
    Junior Member
    Join Date
    Feb 2003
    Posts
    2
    Here is a version that takes advantage of the existing functions in /etc/init.d/knoppix-autoconfig to do the work and will function as a cheatcode.

    IN

    /etc/init.d/knoppix-autoconfig

    CHANGE

    # Set hostname
    hostname Knoppix

    TO

    ### hostname
    # Allow hostname specification via commandline. The default hostname
    # will be overridden via "hostname=Knoppix" boot commandline
    HOSTNAME="$(getbootparam hostanme 2>/dev/null)"
    [ -n "$HOSTNAME" ] || HOSTNAME="Knoppix"

    Who feels like testing a remaster?

  9. #9
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    297
    Quote Originally Posted by jmcglash
    Here is a version that takes advantage of the existing functions in /etc/init.d/knoppix-autoconfig to do the work and will function as a cheatcode.

    IN

    /etc/init.d/knoppix-autoconfig

    CHANGE

    # Set hostname
    hostname Knoppix

    TO

    ### hostname
    # Allow hostname specification via commandline. The default hostname
    # will be overridden via "hostname=Knoppix" boot commandline
    HOSTNAME="$(getbootparam hostanme 2>/dev/null)"
    [ -n "$HOSTNAME" ] || HOSTNAME="Knoppix"

    Who feels like testing a remaster?
    Its not necessary to remaster. It should be enough to put this code+some additions into a knoppix.sh, as its sourced by knoppix-autoconfig so functions like getbootparam are available ...

    cu

    Fabian

  10. #10
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Long Island, NY, USA
    Posts
    1,256
    Just how does this code read "getbootparam"? If I put this in knoppix.sh, will I get a prompt to enter the hostname or do I use some sort of cheatcode at bootup?

    BTW, what if I want to set the hostname permanently, can I just specify hostname="alphaCentauri"?

    TIA,

Page 1 of 2 12 LastLast

Similar Threads

  1. cheatcode suggestion: user=
    By probono in forum Ideas
    Replies: 0
    Last Post: 09-18-2004, 11:25 PM
  2. change hostname?
    By Valhalla in forum General Support
    Replies: 3
    Last Post: 03-25-2004, 07:53 PM
  3. Can't set hostname.
    By WimG in forum Networking
    Replies: 5
    Last Post: 09-27-2003, 04:16 PM
  4. How do I change the hostname?
    By jensen in forum General Support
    Replies: 2
    Last Post: 07-18-2003, 10:30 PM
  5. Replies: 0
    Last Post: 05-29-2003, 12:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Gigabyte 4U AI Server 10x Nvidia GPU 2x Xeon Gold 6150 36 Core 2.7GHz DDR4 RAM picture

Gigabyte 4U AI Server 10x Nvidia GPU 2x Xeon Gold 6150 36 Core 2.7GHz DDR4 RAM

$1499.00



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



867959-B21 HPE ProLiant DL360 G10 CTO Server W/ 2x 865414-B21 1x 840140-001 picture

867959-B21 HPE ProLiant DL360 G10 CTO Server W/ 2x 865414-B21 1x 840140-001

$245.00



Dell PowerEdge R530 2x E5-2630v4 H330 iDRAC8 Port Card Riser No PSU/RAM/HDD picture

Dell PowerEdge R530 2x E5-2630v4 H330 iDRAC8 Port Card Riser No PSU/RAM/HDD

$99.99



Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2690 v3 | 64gb Ram | 2x 1600W picture

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2690 v3 | 64gb Ram | 2x 1600W

$524.99



Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W picture

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W

$409.99



Supermicro 2U GPU Server SYS-2029GP-TR 2x Xeon 6130 32C 6x PCIe 3.0 x16 Slots picture

Supermicro 2U GPU Server SYS-2029GP-TR 2x Xeon 6130 32C 6x PCIe 3.0 x16 Slots

$745.00



Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO picture

Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO

$248.00



Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM picture

Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM

$699.00



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD

$149.99