From b75e0ba0a297fd64307960f98f30c27a689deab7 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Thu, 29 Feb 2024 22:08:29 +0100 Subject: vyos-hostsd: T4270: resolve only hostname without domain name to 127.0.1.1 This is a fix for commit 665ae50729 ("vyos-hostsd: T4270: do not resolve local router FQDN to 127.0.1.1") as it made calls to sudo super slow due to: sudo: unable to resolve host vyos: System error To avoid the initial issue we only add the hostname without domain name, thus the FQDN is not resolved by powerdns. (cherry picked from commit 3712f28025a5bc99e941b5212091a2732b9f6d6c) --- data/templates/vyos-hostsd/hosts.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/templates') diff --git a/data/templates/vyos-hostsd/hosts.tmpl b/data/templates/vyos-hostsd/hosts.tmpl index 03662d562..0875adfd8 100644 --- a/data/templates/vyos-hostsd/hosts.tmpl +++ b/data/templates/vyos-hostsd/hosts.tmpl @@ -3,7 +3,7 @@ # Local host 127.0.0.1 localhost -127.0.1.1 {{ host_name }}{% if domain_name %}.{{ domain_name }} {{ host_name }}{% endif %} +127.0.1.1 {{ host_name }} # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback -- cgit v1.2.3