Re: Getting hostname

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

 



On Thu, 2002-02-14 at 17:23, Richard Wilson wrote:
> Does someone know off hand how I can get the hostname during a kickstart
> build, within the %post section.
> I'm setting static IP's and the hostnames will be in the DNS table.
> 


ip=`/sbin/ifconfig eth0 |grep 'inet addr' |awk {'print $2;'}|cut -c 6-`
hostname=`/usr/bin/host $ip|cut -d ' ' -f5 | cut -d. -f1`


-sv

Attachment: signature.asc
Description: This is a digitally signed message part


[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