carl at personnelware.com
Wed Mar 8 00:13:06 UTC 2006
>>>>That is close to what I want, only it isn't "the hostname", but a copy
>>>>that would have to be updated if the hostname gets updated.
>>>>Is there some way to do:
>>>>send host-name $(hostname);
>>That's what I was hoping for, but no luck. send host-name goes in a
>>config file, so it isnt "run."
> OK then. How about to write a little shell script to change both
> hostnames in
> /etc/hostname and /etc/dhcp3/dhclient.conf in once?
> I have experimented with:
> $ grep --invert-match "send host-name" /etc/dhcp3/dhclient.conf
> But i couldn´t get a shell script working, to exchange this line.
> Once this is done it should be easy to update those files.
> Maybe someone else can help out with this.
Thanks, but I think there are easier (aka better) ways. for instance, if I
switch dhclient to dhcpcd, I can put -h $(/bin/hostname) somewhere. I was
trying to stay as close to the default Ubuntu install so that I could suggest it
being added to dapper++. given that Ubuntu uses dhclient out of the box, and
dhclient will support sending the Box's hostname "soon", I am content editing my
config files and waiting for dhclient before I suggest any Ubuntu enhancements.
Thanks again for your interest.
More information about the ubuntu-users