X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=blobdiff_plain;f=backend%2Finitramfs-tools%2Flive.hook;fp=backend%2Finitramfs-tools%2Flive.hook;h=1817814bb65ddb571b63f9983185e2f8ac544669;hp=5970e7de673f30f4eced7a3a3f59ac22c0a09c5b;hb=43b5c8a4df961f5346e2ce176d6efe7495ddff14;hpb=8d2dac82e4d75ef257dda8304eed41b77b20bd07 diff --git a/backend/initramfs-tools/live.hook b/backend/initramfs-tools/live.hook index 5970e7d..1817814 100755 --- a/backend/initramfs-tools/live.hook +++ b/backend/initramfs-tools/live.hook @@ -240,13 +240,15 @@ fi # /lib/libnss_files.so.*: /etc/hosts and /etc/passwd # /lib/libnss_compat.so.*: /etc/passwd -for _SHLIB in $(find /lib -name 'libnss_dns.so.*') +for _SHLIB in $(find /lib -name 'libnss_dns.so.*' -o -name 'libnss_files.so.*') do copy_exec "${_SHLIB}" done -# might be needed if /etc/hosts is used -#mkdir -p "${DESTDIR}/etc" -#cp -p /etc/nsswitch.conf "${DESTDIR}/etc" +if [ ! -e "${DESTDIR}/etc/nsswitch.conf" ] +then + # Needed to make "hostname -f" honor the domainname provided by DHCP + echo "hosts: files dns" > "${DESTDIR}/etc/nsswitch.conf" +fi [ "${QUIET}" ] || echo .