Re: How to get the hostname in stage2 ?

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

 



On Wed, 2009-01-21 at 13:35 +0200, Alexander Todorov wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
> 
> Hello,
> in a %post I need the hostname of the machine being installed. hostname and
> python's os.uname() report localhost.localdomain while anaconda displays the
> hostname that comes from the DHCP server in the GUI. How do I get the value
> which comes from DHCP? Is it stored somewhere or my only possibility is to parse
> /etc/sysconfig/network ?
> 

Are you calling your post code from within the chroot, or outside of the
chroot?  Inside the chroot at post-install time I don't believe the
hostname or resolver has been setup, but outside the chroot it has.

-- 
Jesse Keating
Fedora -- Freedom² is a feature!
identi.ca: http://identi.ca/jkeating

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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux