X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=backend%2Finitramfs-tools%2Flive.hook;h=b37f54f41d137ff680df108bd93e27c68ea0d1db;hb=fa4cd2e4ca40efa9300d7035ffe3a3fadfdbc47d;hp=5970e7de673f30f4eced7a3a3f59ac22c0a09c5b;hpb=9321eb44e7c29615e115a0fb3e7121e62b189dfa;p=live-boot-grml.git diff --git a/backend/initramfs-tools/live.hook b/backend/initramfs-tools/live.hook index 5970e7d..b37f54f 100755 --- a/backend/initramfs-tools/live.hook +++ b/backend/initramfs-tools/live.hook @@ -236,17 +236,19 @@ fi [ "${QUIET}" ] || echo -n " dns" -# /lib/libnss_dns.so.*:a DNS -# /lib/libnss_files.so.*: /etc/hosts and /etc/passwd -# /lib/libnss_compat.so.*: /etc/passwd +# libnss_dns.so.*: DNS +# libnss_files.so.*: /etc/hosts and /etc/passwd +# libnss_compat.so.*: /etc/passwd -for _SHLIB in $(find /lib -name 'libnss_dns.so.*') +for _SHLIB in $(find /lib /usr/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 .