Subject: Re: can't get dhclient to start during boot
To: None <netbsd-users@NetBSD.org>
From: David Laight <david@l8s.co.uk>
List: netbsd-users
Date: 09/25/2003 09:28:33
> > Maybe it's started before /usr is mounted, and so needs to be statically
> > linked ?
>
> THANK YOU! And thanks to Patrick and David for telling me how to find out
> if the program was dynamically linked.
>
> % ldd /sbin/dhclient
> /sbin/dhclient:
> -lc.12 => /usr/lib/libc.so.12
What you actually need to do is get it linked with /libs/libc.so.12
This is usually done by getting an 'RPATH /lib:/usr/lib' entry' into
the headers.
Looking deeper you also need to get the program to request an elf
interpreter (ld.elf_so) from /libexec not from /usr/libexec.
bsd.shlib.mk does this if BINDIR is /bin or /sbin, otherwise you need
to add the relevant options yourself probably:
-Wl,-dynamic-linker=/libexec/ld.elf_so
-Wl,-rpath-link=/lib:/usr/lib
David
--
David Laight: david@l8s.co.uk