From a43b50452d80da21f1989701121d5bbbd66b28a5 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 18 Oct 2022 09:42:11 +0200 Subject: [PATCH] build-debian-toolbox: Fix slow sudo This tries to resolve the hostname, which does not work with an empty /etc/hosts. Make sure that myhostname gets asked before dns. --- build-debian-toolbox | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-debian-toolbox b/build-debian-toolbox index f1e7f8e..8286876 100755 --- a/build-debian-toolbox +++ b/build-debian-toolbox @@ -27,6 +27,9 @@ apt-get install -y libnss-myhostname sudo eatmydata libcap2-bin # allow sudo with empty password sed -i "s/nullok_secure/nullok/" /etc/pam.d/common-auth + +# unbreak slow host name resolution +sed -i "/^hosts:/ s/files dns myhostname/files myhostname dns/" /etc/nsswitch.conf ' toolbox run --container $RELEASE sh -exc ' -- 2.39.5