From 59aab67d6d33ea8ad523bfcc4833ec786865a696 Mon Sep 17 00:00:00 2001 From: "Gerd v. Egidy" Date: Tue, 26 Jul 2022 22:05:42 +0200 Subject: [PATCH] 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. --- patches/archiso-v43-08-glibc-fix-dns.patch | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/patches/archiso-v43-08-glibc-fix-dns.patch b/patches/archiso-v43-08-glibc-fix-dns.patch index dad9034..9c36768 100644 --- a/patches/archiso-v43-08-glibc-fix-dns.patch +++ b/patches/archiso-v43-08-glibc-fix-dns.patch @@ -1,7 +1,7 @@ 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,6 +12,10 @@ +@@ -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) @@ -12,3 +12,9 @@ diff -u -r archiso-43.orig/archiso/initcpio/install/archiso_pxe_common archiso-4 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() {