Hostname and IP address during kickstart

Rigler, Steve SRigler at MarathonOil.com
Thu Jul 15 13:40:39 UTC 2004


 

> -----Original Message-----
> From: redhat-list-bounces at redhat.com 
> [mailto:redhat-list-bounces at redhat.com] On Behalf Of Pete Nesbitt
> Sent: Thursday, July 15, 2004 8:32 AM
> To: golharam at umdnj.edu; General Red Hat Linux discussion list
> Subject: Re: Hostname and IP address during kickstart
> >
> > Source /etc/sysconfig/network
> > IPADDR=`hostname $HOSTNAME | cut -f 4 -d ' '`
> > echo "127.0.0.1         localhost.localdomain   localhost" 
> > /etc/hosts
> > echo "$IPADDR           $HOSTNAME.umdnj.edu     $HOSTNAME" 
>> /etc/hosts
> >
> >
> > -----
> > Ryan Golhar
> > Computational Biologist
> > The Informatics Institute at
> > The University of Medicine & Dentistry of NJ
> >
> > Phone: 973-972-5034
> > Fax: 973-972-7412
> > Email: golharam at umdnj.edu
> 
> 
> Ryan,
> If you want to use $HOSTNAME, look at 'man hostname' it has a 
> -f and -s option 
> for short or long (fqdn) option.
> 
> I don't see how "IPADDR=`hostname $HOSTNAME | cut -f 4 -d ' 
> '`" works, that 
> not going to give you an IP address.
> 
> Also, how are you getting an IP ftrom 
> /etc/sysconfig/network,if it's dhcp, 
> there should be no IP address in there (nor is it going to be in  
> /etc/sysconfig/network-scripts/ifcfg-eth0)
> 
> Pete

Given what "cut" is expecting, I'd assume we'd really mean to
run "host" instead of "hostname".

-Steve





More information about the redhat-list mailing list