From 02e312ab04a214b81b04600443dfc999b34d2fb4 Mon Sep 17 00:00:00 2001 From: Joanna Rutkowska Date: Tue, 8 May 2012 18:30:21 +0200 Subject: [PATCH] vm: Add localhost alias to /etc/hosts ... or otherwise, some programs will hang for many secconds trying to resolve localhost. --- vm-init.d/qubes_core | 2 +- vm-systemd/qubes-sysinit.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vm-init.d/qubes_core b/vm-init.d/qubes_core index c3accd92..52bb1cdb 100755 --- a/vm-init.d/qubes_core +++ b/vm-init.d/qubes_core @@ -26,7 +26,7 @@ start() # because it makes some of the pre-created dotfiles invalid (e.g. .kde/cache-) # (let's be frank: nobody's gonna use xterm on DispVM) hostname $name - (grep -v "\<$name\>" /etc/hosts; echo "127.0.0.1 $name") > /etc/hosts + (grep -v "\<$name\>" /etc/hosts; echo "127.0.0.1 $name localhost") > /etc/hosts fi timezone=`/usr/bin/xenstore-read qubes-timezone 2> /dev/null` diff --git a/vm-systemd/qubes-sysinit.sh b/vm-systemd/qubes-sysinit.sh index d78929ca..356a18ba 100755 --- a/vm-systemd/qubes-sysinit.sh +++ b/vm-systemd/qubes-sysinit.sh @@ -52,7 +52,7 @@ done name=`$XS_READ name` if [ -n "$name" ]; then hostname $name - (grep -v "\<$name\>" /etc/hosts; echo "127.0.0.1 $name") > /etc/hosts + (grep -v "\<$name\>" /etc/hosts; echo "127.0.0.1 $name localhost") > /etc/hosts fi timezone=`$XS_READ qubes-timezone 2> /dev/null`