Networking Forums

Networking Forums > Computer Networking > Linux Networking > send hostname in dhclient.conf

Reply
Thread Tools Display Modes

send hostname in dhclient.conf

 
 
Daniel.Schiller@gmail.com
Guest
Posts: n/a

 
      04-25-2006, 02:59 PM
Hi!
I hope this question has not been answered yet in this form...
I've searched through the web/newsgroups but I haven't find a real
solution for my problem...
first of all i use debian stable

I want that dhclient.conf send the real hostname of the pc to the
dhcp-server! like windows-pc's (or freebsd, suse...f.ex.
"hostname=AUTO") do... instead of manually write the hostname value
like (send host-name "dell101" in the dhclient.conf...
is there any script that copy the entry in /etc/hostname and paste it
in /etc/dhclient.conf at boottime?
sorry if this question has been posted oftener...
Can you please give me some tipp?
thank u very much!

 
Reply With Quote
 
 
 
 
Unruh
Guest
Posts: n/a

 
      04-25-2006, 04:11 PM
(E-Mail Removed) writes:

>Hi!
>I hope this question has not been answered yet in this form...
>I've searched through the web/newsgroups but I haven't find a real
>solution for my problem...
>first of all i use debian stable


>I want that dhclient.conf send the real hostname of the pc to the
>dhcp-server! like windows-pc's (or freebsd, suse...f.ex.
>"hostname=AUTO") do... instead of manually write the hostname value
>like (send host-name "dell101" in the dhclient.conf...
>is there any script that copy the entry in /etc/hostname and paste it
>in /etc/dhclient.conf at boottime?
>sorry if this question has been posted oftener...
>Can you please give me some tipp?
>thank u very much!



?? Do it.
echo send host-name `hostname`hostname`>>/etc/dhclient-eth0.conf
Of course you might want to clean out old ones as well, which would be a
little bit trickier

cp /etc/dhclient-eth0.conf /tmp/dh$$
awk ' $0 !~/send host-name/ {print $0}'>/etc/dhclient-eth0.conf
echo send host-name \"`hostname`\">>/etc/dhclient-eth0.conf
rm /tmp/dh$$

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
search path in resolv.conf overwritten by the hostname after reboot powah Linux Networking 2 04-15-2009 10:19 PM
dhcpd.conf, resolv.conf and the search directive Andy Richardson Linux Networking 4 07-13-2005 08:23 AM
Use dhclient with two hostnames zushi Linux Networking 1 06-07-2005 01:20 PM
dhclient.conf "retry" param units. pt Linux Networking 1 04-25-2004 09:56 PM
dhclient Does Not Set /etc/resolv.conf Hank Kingwood Linux Networking 4 02-03-2004 05:02 PM



1 2 3 4 5 6 7 8 9 10 11