Tiny Core Linux

Tiny Core Base => TCB Bugs => Topic started by: hpstr on December 30, 2010, 04:17:51 PM

Title: 3.4(.1): udhcpc does not respect hostname boot code
Post by: hpstr on December 30, 2010, 04:17:51 PM
A minor issue:

I use the host=abc bootcode, and the hostname gets set (/etc/hostname) and reported (/bin/hostname) correctly.

However, udhcpc on boot still starts with the "-H box" option, so DHCP servers show the "box" hostname.

/etc/init.d/dhcp.sh uses the option "-h" (lower case) and the hostname reported by /bin/hostname, so there should be another call for udhcpc, but I didn`t find it yet.

Hans

Edit: boot code is host, not hostname
Title: Re: 3.4(.1): udhcpc does not respect hostname boot code
Post by: gerald_clark on December 30, 2010, 04:24:10 PM
The boot code is host, not hostname.
Title: Re: 3.4(.1): udhcpc does not respect hostname boot code
Post by: hpstr on December 30, 2010, 04:32:18 PM
The boot code is host, not hostname.
Correct, my fault. I`ll edit my above post accordingly.
Title: Re: 3.4(.1): udhcpc does not respect hostname boot code
Post by: curaga on December 30, 2010, 04:33:11 PM
Can't reproduce on 3.4.1 "base norestore host=testy". Perhaps you start it via bootlocal.sh, a network daemon etc?
Title: Re: 3.4(.1): udhcpc does not respect hostname boot code
Post by: hpstr on December 30, 2010, 04:39:57 PM
No, my boot-up sequence is still "clean".

Boot codes are:
quiet laptop kmap=qwertz/de-latin1 vga=788 tce=hda6 opt=hda6 home=hda6 restore=hda6 user=hpstr host=foxtrot

My eth0 is a PCMCIA card.
Title: Re: 3.4(.1): udhcpc does not respect hostname boot code
Post by: tinypoodle on December 30, 2010, 04:55:57 PM
No, my boot-up sequence is still "clean".

Boot codes are:
quiet laptop kmap=qwertz/de-latin1 vga=788 tce=hda6 opt=hda6 home=hda6 restore=hda6 user=hpstr host=foxtrot

My eth0 is a PCMCIA card.

What exactly do you mean by that?
I see a possible conflict with all your boot options, except if you have customized your backup to entirely exclude /opt & /home. Why would you use 'quiet' when trying to troubleshoot events happening at boot time?
Title: Re: 3.4(.1): udhcpc does not respect hostname boot code
Post by: hpstr on December 30, 2010, 05:37:56 PM
No, my boot-up sequence is still "clean".

What exactly do you mean by that?

No changes yet in bootlocal.sh or other scripts of the bootup sequence.

Quote
I see a possible conflict with all your boot options, except if you have customized your backup to entirely exclude /opt & /home.

What conflict? I have a persistent home, so I exclude /home but not /opt.

Quote
Why would you use 'quiet' when trying to troubleshoot events happening at boot time?

Of course I tried without, but the chatty boot did not give any further hints, neither did dmesg.

However, you gave me the hint, mentioning my /opt. The bad guy causing udhcpc to use the "box" hostname is /opt/eth0.sh; it contains

Code: [Select]
udhcpc -H box -b -i eth0
with the hardwired hostname.

Changing it to

Code: [Select]
/sbin/udhcpc -H `/bin/hostname` -b -i eth0
fixed it.

Thanks, Hans

Title: Re: 3.4(.1): udhcpc does not respect hostname boot code
Post by: hpstr on December 30, 2010, 05:43:33 PM
I see a possible conflict with all your boot options, except if you have customized your backup to entirely exclude /opt & /home.

What conflict? I have a persistent home, so I exclude /home but not /opt.

OK, I understand what you mean. Including persistent /opt in filetool backup is useless.

Fixed. Thank you.

Hans