From: Martin Pitt Date: Tue, 18 Oct 2022 07:42:11 +0000 (+0200) Subject: build-debian-toolbox: Fix slow sudo X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=commitdiff_plain;h=a43b50452d80da21f1989701121d5bbbd66b28a5 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. --- 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 '