systemrescue-zfs/patches/archiso-v43-08-glibc-fix-dns.patch
Gerd v. Egidy 59aab67d6d fix dns requests in sysrescue-configuration.lua (#291)
The dns library used by lua requires /etc/hosts to exist, otherwise all
requests for name resolution are denied. This meant that using the
sysrescuecfg boot option with a http URL and hostname did not work
while using an IP worked.

This patch adds an empty /etc/hosts file to the initramfs image to fix this.
2022-07-26 22:05:42 +02:00

21 lines
1 KiB
Diff

diff -u -r archiso-43.orig/archiso/initcpio/install/archiso_pxe_common archiso-43/archiso/initcpio/install/archiso_pxe_common
--- archiso-43.orig/archiso/initcpio/install/archiso_pxe_common 2019-10-16 11:10:09.000000000 +0000
+++ archiso-43/archiso/initcpio/install/archiso_pxe_common 2022-07-04 21:27:54.206666328 +0000
@@ -12,9 +12,16 @@
add_binary $(readlink -f /usr/lib/libnss_files.so.2)
add_symlink /usr/lib/libnss_dns.so.2 $(readlink /usr/lib/libnss_dns.so.2)
add_binary $(readlink -f /usr/lib/libnss_dns.so.2)
+ add_symlink /usr/lib/libnss_mymachines.so.2 $(readlink /usr/lib/libnss_mymachines.so.2)
+ add_binary $(readlink -f /usr/lib/libnss_mymachines.so.2)
+ add_symlink /usr/lib/libnss_resolve.so.2 $(readlink /usr/lib/libnss_resolve.so.2)
+ add_binary $(readlink -f /usr/lib/libnss_resolve.so.2)
add_dir /etc
echo "hosts: files dns" > $BUILDROOT/etc/nsswitch.conf
+
+ # the lua dns library (used in sysrescue-configuration.lua) requires /etc/hosts to exist
+ touch $BUILDROOT/etc/hosts
}
help() {