"Kirk R. Wythers" <[EMAIL PROTECTED]> writes:
> I am running a rh7 and have new cable modem (mediaone roadrunner). The
> thing practically configured itself. All I did was open linuxconfig and
> check enable Config mode Dhcp under adapter 1. My concern however is
> that mediaone resets my hostname to my nic cards MAC. My hostname is now
>
> $ hostname
> nic-25-c101-030.mn.mediaone.net
>
> I want to get localhost back. I thought there was a configure option
> (-H) under dhcpcd to use the original machine hostname, not the one
> supplied by the dhcp server. If so, where (what file) do you add or
> remove options like -H?
I understood that option to be just the reverse.
man dhcpcd
-H Forces dhcpcd to set hostname of the host to the
hostname option supplied by DHCP server. By
default dhcpcd will NOT set hostname of the host to
the hostname option received from DHCP server.
You may be thinking of lowercase -h:
-h hostname
specifies a string used for the hostname option
field when dhcpcd sends DHCP messages. Some DHCP
servers require the hostname option field contain
ing a specific string in the DHCP messages from
clients.
If you are using `/sbin/ifup' to start the interface or if the software
you use calls `ifup', then you can adjust the arguments in that file.
I run only dhcpcd ... no pump. I'm not sure why my hostname remains
the one I set in linuxconf/networking/basic info. But my hostname as
seen by `hostname' stays the one I set not the one dhcp server gives.
Starting around line 96 of the stock `ifup' script I made these changes.
You can compare to the stock file but my changes are commented:
at top of file I added this var:
That file sets some stuff I wanted set.
## Var added by HP Jan 11 17:27:11 2001
## file name for dhcpcd -c to run \
## [ /etc/sysconfig/network-scripts/ifdhcpcd-done
FILE_TO_RUN="/etc/sysconfig/network-scripts/ifdhcpcd-done"
then around line 96
[...]
f [ -n "${DYNCONFIG}" ]; then
PUMPARGS=
DHCPCDARGS=
if [ -n "${DHCP_HOSTNAME}" ]; then
PUMPARGS="-h ${DHCP_HOSTNAME}"
DHCPCDARGS="-h ${DHCP_HOSTNAME}"
fi
if [ -n "${NEEDHOSTNAME}" ]; then
# HP commented Jan 11 17:33:56 2001
# PUMPARGS="${PUMPARGS} --lookup-hostname"
DHCPCDARGS="${DHCPCDARGS} -H -d -c $FILE_TO_RUN"
fi
echo -n "Determining IP information for ${DEVICE}..."
## Commented Jan 09 15:32:47 2001
# if /sbin/pump ${PUMPARGS} -i ${DEVICE} ; then
# echo " done."
if /sbin/dhcpcd ${DHCPCDARGS} ${DEVICE} ; then
echo " done."
else
echo " failed."
exit 1
[...]
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list