/sbin/ifup does not automatically set the machine's hostname if the machine
is configured to use DHCP and does not have a hostname set in
/etc/sysconfig/network. Although /sbin/ifup runs the 'need_hostname' script
(sourced from network-functions) it never uses the NEEDHOSTNAME variable to
take measures to assign a hostname from DNS if none is present.
The hostname not being set results in problems including sendmail failing
to send messages by SMTP as most SMTP servers reject 'HELO (none)' apon
initiation of message transfer.
A patch to /sbin/ifup follows:
--- /tmp/ifup.orig Mon Mar 13 22:48:31 2000
+++ /sbin/ifup Mon Mar 13 22:48:57 2000
@@ -87,6 +87,9 @@
if [ -n "$DHCP_HOSTNAME" ]; then
+ if [ -n "$NEEDHOSTNAME" ]; then
+ PUMPARGS="$PUMPARGS --lookup-hostname"
echo -n "Determining IP information for $DEVICE..."
if /sbin/pump $PUMPARGS -i $DEVICE ; then
echo " done."
fixed as of initscripts-5.02-1.