WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: 3.4(.1): udhcpc does not respect hostname boot code  (Read 3757 times)

Offline hpstr

  • Newbie
  • *
  • Posts: 19
3.4(.1): udhcpc does not respect hostname boot code
« 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
« Last Edit: December 30, 2010, 04:33:28 PM by hpstr »
Computers help us solving problems which wouldn`t exist without computers.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: 3.4(.1): udhcpc does not respect hostname boot code
« Reply #1 on: December 30, 2010, 04:24:10 PM »
The boot code is host, not hostname.

Offline hpstr

  • Newbie
  • *
  • Posts: 19
Re: 3.4(.1): udhcpc does not respect hostname boot code
« Reply #2 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.
Computers help us solving problems which wouldn`t exist without computers.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: 3.4(.1): udhcpc does not respect hostname boot code
« Reply #3 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?
The only barriers that can stop you are the ones you create yourself.

Offline hpstr

  • Newbie
  • *
  • Posts: 19
Re: 3.4(.1): udhcpc does not respect hostname boot code
« Reply #4 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.
Computers help us solving problems which wouldn`t exist without computers.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: 3.4(.1): udhcpc does not respect hostname boot code
« Reply #5 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?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline hpstr

  • Newbie
  • *
  • Posts: 19
Re: 3.4(.1): udhcpc does not respect hostname boot code
« Reply #6 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

Computers help us solving problems which wouldn`t exist without computers.

Offline hpstr

  • Newbie
  • *
  • Posts: 19
Re: 3.4(.1): udhcpc does not respect hostname boot code
« Reply #7 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
Computers help us solving problems which wouldn`t exist without computers.