Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DHCPCD and RC- "provide net" caused hostname from router
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dman777
Veteran
Veteran


Joined: 10 Jan 2007
Posts: 1004

PostPosted: Sat Jan 29, 2011 6:43 am    Post subject: DHCPCD and RC- "provide net" caused hostname from Reply with quote

This is a mixture of RC question and Dhcpcd.

My hostname is set to localhost. But for some reason I was getting weird cryptic names upon bootup for my hostname from my router.

I then spent hours investigating and came to this in /etc/init.d/dhcpcd":
Code:

localhost ~ # cat dhcpcd.bck
#!/sbin/runscript
# Copyright 2007-2008 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license.

command=/sbin/dhcpcd
pidfile=/var/run/dhcpcd.pid
command_args=-q
name="DHCP Client Daemon"

depend()
{
   provide net
   need localmount
   use logger network
   after bootmisc modules
   before dns
}


I took out the directive "provide net" which solved my problem- after boot up my hostname was localhost as it should be.

Now, I know that 'provide' provides a virtual service(not from just one service but a combined output of a few services put together). But can someone please explain to me how this caused dhcpcd to cause the router to give my system the hostname?
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 622
Location: Yeovil, Somerset, UK

PostPosted: Fri Feb 18, 2011 11:47 pm    Post subject: Re: DHCPCD and RC- "provide net" caused hostname f Reply with quote

Is this still of interest?

The cryptic hostnames are probably related to your MAC address.

Also, I don't know anyone who uses localhost as a hostname deliberately - still it is a good way to test corner cases!

By stopping dhcpd from providing net other things may stop working that depend on it but I suspect that net.lo also provides it so it should be OK.

Cheers
Jon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum