Pure LFS - ch6 /etc file reqs for testing glibc

Ryan.Oliver at pha.com.au Ryan.Oliver at pha.com.au
Sun Feb 23 19:02:33 PST 2003

Greetings all,

You may have noticed in the hint so far that there is a list of possible
files required in /etc for testing glibc in chapter 6 but no real
explanation as to why.

Quite simply here is what we need

a) an /etc/nsswitch.conf
b) any files that are referenced by nsswitch.conf with blah: files

Currently I am using the following code snippet at the end of ch5.
YMMV but so far it works, some may not be needed...

(BTW new script coming soon with typo fixes and some additions )

Also for testing binutils ch6 we require a symlink from /bin/stty to
/stage1/bin/stty (for anyway)

# Create initial nsswitch.conf file

cat > ${LFS}/etc/nsswitch.conf << "EOF"
# /etc/nsswitch.conf

passwd:     files
shadow:     files
group:      files

hosts:      files dns


# Copy files required for NSS

# As we've specified dns for hosts, copy across
# /etc/resolv.conf

cp /etc/resolv.conf ${LFS}/etc

# Check for existence of the following nss files.
# If they exist, copy them across and update our new
# ${LFS}/etc/nsswitch.conf

NSSFILES="ethers netmasks networks protocols rpc services netgroup
automount aliases"
for nssfile in ${NSSFILES}; do
   test -e /etc/${nssfile} && \
      cp /etc/${nssfile} ${LFS}/etc &&
      echo "${nssfile}: files" >> ${LFS}/etc/nsswitch.conf

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list