I think, pump with --lookup-hostname is not correctly implemented. * Pump version: 0.7.11 I want auto configuation at boot time, then I set the network option as... /etc/sysconfig/network ----- NETWORK="yes" --------- /etc/sysconfig/network-scripts/ifcfg-eth0 ----- ONBOOT="yes" BOOTPROTO="bootp" DEVICE="eth0" ----- All looks good, but hostname,domainname are incorrect. In /etc/sysconfig/network-scripts/ifup script, hostname maybe retrived with pump using "--lookup-hostname" option. But, hostname is not setted with below manner.. [...] if [ -n "$NEEDHOSTNAME" ]; then PUMPARGS="$PUMPARGS --lookup-hostname" DHCPCDARGS="$DHCPCDARGS -H" fi [...] I see, the pump source, and I found, there is no using 'sethostname', or 'setdomainname' This is my quick hack for correct hostname/domainname retriving. -------------- --- pump-0.7.11/dhcp.c Tue Jul 4 14:27:04 2000 +++ pump-0.7.11.new/dhcp.c Mon Sep 18 17:50:30 2000 @@ -1305,8 +1305,8 @@ close(s); parseReply(&bresp, intf); - if (flags & PUMP_FLAG_FORCEHNLOOKUP) - intf->set &= ~(PUMP_NETINFO_HAS_DOMAIN | PUMP_NETINFO_HAS_HOSTNAME); +// if (flags & PUMP_FLAG_FORCEHNLOOKUP) /* XXX */ +// intf->set &= ~(PUMP_NETINFO_HAS_DOMAIN | PUMP_NETINFO_HAS_HOSTNAME); return NULL; } diff -ru pump-0.7.11/pump.c pump-0.7.11.new/pump.c --- pump-0.7.11/pump.c Fri Feb 18 00:15:48 2000 +++ pump-0.7.11.new/pump.c Mon Sep 18 18:32:04 2000 @@ -410,6 +410,16 @@ } else { pumpSetupInterface(intf + numInterfaces); + if (intf[numInterfaces].set & PUMP_NETINFO_HAS_HOSTNAME) { + sethostname(intf[numInterfaces].hostname, + strlen(intf[numInterfaces].hostname)); + syslog(LOG_INFO, "HOST %s (%d)", intf[numInterfaces].hostname,strlen(intf[numInterfaces].hostname)); + } + if (intf[numInterfaces].set & PUMP_NETINFO_HAS_DOMAIN) { + setdomainname(intf[numInterfaces].domain, + strlen(intf[numInterfaces].domain)); + syslog(LOG_INFO, "DOMAIN %s", intf[numInterfaces].domain); + } syslog(LOG_INFO, "configured interface %s", intf->device); if (intf->set & PUMP_NETINFO_HAS_GATEWAY) {
The hostname is only retrieved - it is the responsibility of the initscripts or whatever to actually set them. FWIW setdomainname() isn't going to do what you think it is. Apologies for the unresponsiveness of the previous pump maintainer...