1 commit 6666658535b255cb71d48ddeb415aeb3023e1251
2 Author: Michael Prokop <mika@grml.org>
3 Date: Tue Jun 7 10:15:52 2011 +0200
5 Do not fail in multiarch environment when installing libnss_dns.so.
7 Updating initramfs fails with:
9 | live-boot: core filesystems devices utils:memdisk udev wget blockdevE: /usr/share/initramfs-tools/hooks/live failed with return 1.
11 with multiarch libc because the filename is no longer necessarily
12 /lib/libnss_dns.so.* but could also be e.g.
13 /lib/x86_64-linux-gnu/libnss_dns.so.*.
16 ===================================================================
17 --- a/hooks/live 2011-07-24 22:08:17.000000000 +0200
18 +++ b/hooks/live 2011-07-24 22:08:18.000000000 +0200
22 #copy_exec /lib/libnss_files.so.* /lib # /etc/hosts and /etc/passwd
23 -copy_exec /lib/libnss_dns.so.* /lib # DNS server
25 +if ls /lib/libnss_dns.so.* >/dev/null 2>&1 ; then # non-multiarch libc
26 + copy_exec /lib/libnss_dns.so.* /lib
27 +elif ls /lib/*/libnss_dns.so.* >/dev/null 2>&1 ; then # multiarch libc
28 + for libnss in /lib/*/libnss_dns.so.* ; do
32 + echo "Warning: libnss_dns.so.* not found. DNS in initramfs not functional."
34 #copy_exec /lib/libnss_compat.so.* /lib # /etc/passwd
36 # Configuration file - may be needed if /etc/hosts is used.