View previous topic :: View next topic |
Author |
Message |
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Sat Jan 29, 2011 6:43 am Post subject: DHCPCD and RC- "provide net" caused hostname from |
|
|
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 |
|
|
gerdesj l33t
Joined: 29 Sep 2005 Posts: 622 Location: Yeovil, Somerset, UK
|
Posted: Fri Feb 18, 2011 11:47 pm Post subject: Re: DHCPCD and RC- "provide net" caused hostname f |
|
|
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 |
|
|
|