I have a machine connected to MediaOne through a cable modem. Its IP
address is assigned by DHCP. The machine is called 'petep.ne.mediaone.net'.
'hostname' returns 'petep'.
Nearly everything appears to work normally but I can't, for instance, start
a screensaver. When I try starting it from the menu, nothing obvious
happens and 'ps' shows no screensaver. When I try starting it from a
command line in an xterm window, I get a message saying 'gethostbyname'
fails. I'm not sure why the screensaver needs that... $DISPLAY is ":0.0".
If I make a hosts file entry like:
----
24.128.104.30 petep petep.ne.mediaone.net
----
the screensaver is happy. Of course the address will change at the whim of
MediaOne. I had put in an arbitrary address in the appropriate range
thinking that dhcpcd would perhaps replace it with the correct one, but
that didn't seem to happen.
I could, of course, do something like (not checked)
----
#!/bin/bash
$addr=/sbin/ifconfig -a eth1|sed -n 's/.*inet addr:\([.0-9]*\) .*/\1/p'
sed "s/^[.0-9][.0-9]*\( *petep *\)/$adr\1/" /etc/hosts >/etc/hosts.new
mv /etc/hosts.new /etc/hosts
----
and invoke this from /etc/sysconfig/network-scripts/ifdhcpc-done or some
such place, but it strikes me that there must be a pre-canned solution
that I'm missiing here.
Can someone provide a clue?
pete peterson
GenRad, Inc.
7 Technology Park Drive
Westford, MA 01886-0033
[EMAIL PROTECTED] or [EMAIL PROTECTED]
+1-978-589-7478 (GenRad); +1-978-256-5829 (Home: Chelmsford, MA)
+1-978-589-2088 (Closest FAX); +1-978-589-7007 (Main GenRad FAX)
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.