View previous topic :: View next topic |
Author |
Message |
davidshen84 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 09 Aug 2008 Posts: 321
|
Posted: Sat Aug 09, 2008 4:55 pm Post subject: [Solved] How to stop dhcpcd from looking up hostname? |
|
|
Hi,
Every time I start my pc, it would try to look up the hostname of my pc. But my dhcp server do not provide that function, and it always saying it failed to look up the hostname. What's more annoying, when I work in a windows domain, it would find a wired hostname, which is actually belongs to another windows pc.
I read the man page carefully, and googled for a while, but did not find any way to stop the dhcpcd from looking up the hostname. Could someone help me stop it.
Many thanks ![Smile :)](images/smiles/icon_smile.gif) _________________ David Shen
Last edited by davidshen84 on Wed Aug 13, 2008 1:18 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bunder Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
Joined: 10 Apr 2004 Posts: 5947
|
Posted: Mon Aug 11, 2008 2:21 am Post subject: |
|
|
/etc/conf.d/net:
Quote: | dhcp_eth0="nosendhost" |
from /etc/conf.d/net.example.
cheers _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
davidshen84 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 09 Aug 2008 Posts: 321
|
Posted: Tue Aug 12, 2008 2:09 am Post subject: |
|
|
bunder wrote: | /etc/conf.d/net:
Quote: | dhcp_eth0="nosendhost" |
from /etc/conf.d/net.example.
cheers |
Thanks, but that does not seem to work for me. I edit the /etc/conf.d/net file and reboot my pc, I still have a wired hostname retrieved from the dhcp server. Does that host name can be cached in my local? How can I remove it?
Thanks again. _________________ David Shen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
richard.scott Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
Posted: Tue Aug 12, 2008 12:44 pm Post subject: |
|
|
what is in /etc/conf.d/hostname??
Code: | cat /etc/conf.d/hostname
# /etc/conf.d/hostname
# Set to the hostname of this machine
HOSTNAME="amd" |
If this is set to "localhost" or nothing then dhcp will always try and set the hostname |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
davidshen84 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 09 Aug 2008 Posts: 321
|
Posted: Wed Aug 13, 2008 12:52 pm Post subject: |
|
|
richard.scott wrote: | what is in /etc/conf.d/hostname??
Code: | cat /etc/conf.d/hostname
# /etc/conf.d/hostname
# Set to the hostname of this machine
HOSTNAME="amd" |
If this is set to "localhost" or nothing then dhcp will always try and set the hostname |
Yes it is "localhost"...So, I should change it, right? Thanks. ![Smile :)](images/smiles/icon_smile.gif) _________________ David Shen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
davidshen84 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 09 Aug 2008 Posts: 321
|
Posted: Wed Aug 13, 2008 12:54 pm Post subject: |
|
|
UberLord wrote: | dhcpcd-4 no longer does this by default |
Sorry, but what is a dhcpcd-4? The next version of dhcpcd, right? But I found cannot emerge it right now...![Sad :(](images/smiles/icon_sad.gif) _________________ David Shen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rahulthewall Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/3921494714948217d1c431.jpg)
Joined: 01 Nov 2007 Posts: 1264 Location: Zürich
|
Posted: Wed Aug 13, 2008 1:38 pm Post subject: |
|
|
davidshen84 wrote: | UberLord wrote: | dhcpcd-4 no longer does this by default |
Sorry, but what is a dhcpcd-4? The next version of dhcpcd, right? But I found cannot emerge it right now...![Sad :(](images/smiles/icon_sad.gif) |
That is because it is masked. You can add it to /etc/portage/package.keywords if you want to install it. However, please remember that it is not marked as stable yet by the Gentoo team, so you might experience some problems. However, I am using the latest version of dhcpcd and it works without a problem for me. _________________ Who shall guard the guards? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
davidshen84 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 09 Aug 2008 Posts: 321
|
Posted: Thu Aug 14, 2008 7:15 am Post subject: |
|
|
rahulthewall3000 wrote: | davidshen84 wrote: | UberLord wrote: | dhcpcd-4 no longer does this by default |
Sorry, but what is a dhcpcd-4? The next version of dhcpcd, right? But I found cannot emerge it right now...![Sad :(](images/smiles/icon_sad.gif) |
That is because it is masked. You can add it to /etc/portage/package.keywords if you want to install it. However, please remember that it is not marked as stable yet by the Gentoo team, so you might experience some problems. However, I am using the latest version of dhcpcd and it works without a problem for me. |
Thanks. By setting a new hostname in /etc/conf.d/hostname, dhcpcd works for me as expected. I think I do not need dhcpcd-4 for now.![Smile :)](images/smiles/icon_smile.gif) _________________ David Shen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|