Add extra patch to support dns with multiarch.
authorUlrich Dangel <mru@grml.org>
Sun, 12 Jun 2011 03:13:24 +0000 (05:13 +0200)
committerUlrich Dangel <mru@grml.org>
Mon, 13 Jun 2011 00:47:22 +0000 (02:47 +0200)
This patch is based on 6666658535b255cb71d48ddeb415aeb3023e1251.

debian/patches/30_support_multiarch_dns.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/30_support_multiarch_dns.patch b/debian/patches/30_support_multiarch_dns.patch
new file mode 100644 (file)
index 0000000..c4cc8d8
--- /dev/null
@@ -0,0 +1,36 @@
+commit 6666658535b255cb71d48ddeb415aeb3023e1251
+Author: Michael Prokop <mika@grml.org>
+Date:   Tue Jun 7 10:15:52 2011 +0200
+
+    Do not fail in multiarch environment when installing libnss_dns.so.
+    
+    Updating initramfs fails with:
+    
+    | live-boot: core filesystems devices utils:memdisk udev wget blockdevE: /usr/share/initramfs-tools/hooks/live failed with return 1.
+    
+    with multiarch libc because the filename is no longer necessarily
+    /lib/libnss_dns.so.* but could also be e.g.
+    /lib/x86_64-linux-gnu/libnss_dns.so.*.
+
+diff --git a/hooks/live b/hooks/live
+index 3862a60..b3de1e5 100755
+--- a/hooks/live
++++ b/hooks/live
+@@ -254,7 +254,16 @@ fi
+ # DNS for initramfs
+ #copy_exec /lib/libnss_files.so.*      /lib  # /etc/hosts and /etc/passwd
+-copy_exec /lib/libnss_dns.so.*      /lib  # DNS server
++# DNS server:
++if ls /lib/libnss_dns.so.* >/dev/null 2>&1 ; then # non-multiarch libc
++        copy_exec /lib/libnss_dns.so.*      /lib
++elif ls /lib/*/libnss_dns.so.* >/dev/null 2>&1 ; then # multiarch libc
++        for libnss in /lib/*/libnss_dns.so.* ; do
++                copy_exec "$libnss"
++        done
++else
++        echo "Warning: libnss_dns.so.* not found. DNS in initramfs not functional."
++fi
+ #copy_exec /lib/libnss_compat.so.*      /lib  # /etc/passwd
+ # Configuration file - may be needed if /etc/hosts is used.
index 0e54294..f4b9fac 100644 (file)
@@ -14,3 +14,4 @@
 26_support_dns_bootoption.patch
 27_support_static_ip.patch
 28_remove_localized_manpages.patch
+30_support_multiarch_dns.patch