Re: DNS in stage1

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

 



Aha!

As it turns out, your response reminded me that I wasn't working with the latest anaconda - I was working with the RHEL5 one.  I.e. "old".  And lo and behold, when I peek into *that* version's loader, I see this:

/* This is dumb, but glibc doesn't like to do hostname lookups w/o libc.so */

and an implementation of a function "mygethostbyname" which loader calls to grab kickstart files.

So I borrowed that object file and now off I go!

Thanks for your help David.

Andrew Lusk

On Fri, 22 Feb 2008 15:40:51 -0800
"Andrew Lusk" <andrew.lusk@xxxxxxxxx> wrote:

> I'm having trouble with DNS during stage1.  loader can use DNS just fine -
> but my test program that I want running alongside loader can't (it gets
> EAI_NODATA from getaddrinfo).  I think it might have something to do with
> the "just so you know, since you're statically linking and using
> getaddrinfo, you'll still need the libraries you're building with present
> when you actually run this" warnings I get when I build my program (or even
> ping, which also fails in the same way while loader succeeds).
>
> So I tried to build loader and see if it got those warnings, but I can't
> figure out how to build a static loader without tweaking the makefiles
> myself (I'm sure there's a more kosher way since it's meant to be built
> statically).
>
> Anyone have any insight?

loader is no longer a staticly linked program.  We are dynamic now.  Very dynamic.  Edgy, even.

You should be able to use libresolv stuff just as you would on a regular Linux system.  Just link with -lresolv and you're good to go.

Note that we only include the dns and files modules for nsswitch.  We don't have nis, nisplus, hesiod, or any other of those other modules.

> My code that doesn't work with DNS is called when loader tries to grab the
> kickstart file (it's a proxy, so I have ks=http://127.0.0.1:8080/foo/ks.cfg,
> and my code attempts to resolve some DNS when the client connects) so I know
> that the network is up at that point.

If you want to provide a link to your program's code, I'll take a look at it.


--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI
_______________________________________________
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