Re: send hostname in dhclient.conf
- From: Unruh <unruh-spam@xxxxxxxxxxxxxx>
- Date: 25 Apr 2006 16:11:01 GMT
Daniel.Schiller@xxxxxxxxx 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$$
.
- References:
- send hostname in dhclient.conf
- From: Daniel . Schiller
- send hostname in dhclient.conf
- Prev by Date: Re: Specifying script as printer backend
- Next by Date: Wget hangs: process never terminates
- Previous by thread: send hostname in dhclient.conf
- Next by thread: Wget hangs: process never terminates
- Index(es):