Re: PUMP-DHCLIENT ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 18 Dec 2002, Denis E. Pilon wrote:

>How can I get RH80 to grab the hostname from the dhcp server when
>installing.  The hostname never gets updated with pump, and dhclient
>will not run because of kernel limitation ?
>
>I usually install 30-100+ nodes and need to grab the hostname during
>kickstart and copy it to /etc/sysconfig/network.  Any suggestions ?

I once (another place, another job) wrote this for Redhat 6.2:

# the hostname comes from the DHCP server, and is stored in /tmp/netinfo
# one small problem; we're running chrooted
HOSTNAME=`/sbin/debugfs -R "cat /tmp/netinfo" /dev/ram0 | \
  grep -E 'HOSTNAME=[[:alnum:]-]+' | awk -F= '{ print $NF }'`
if [ "x$HOSTNAME" = "x" ]; then
  HOSTNAME = "localhost"
fi


I have no idea if it would work for RH80. An initial %post --nochroot
would be cleaner.

Alternatives would be to include the hostname in the kickstart file, or
use reverse DNS lookups, assuming the box in installed in situ.

Other posts in this thread suggest to me that
use-host-decl-names on;
in your dhcpd.conf might sort things out.


Cheers,

Phil





[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux