From b4aa6c6ddc57f8a389c2d4048e199f15c4ffb145 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Tue, 8 May 2012 23:41:53 +0200 Subject: [PATCH] vm/spec: fix /etc/hosts if it was broken by previous version --- rpm_spec/core-vm.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index 3158b57b..0b9d5ffd 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -237,6 +237,14 @@ sed 's/^net.ipv4.ip_forward.*/#\0/' -i /etc/sysctl.conf sed -i -e '/^exclude = kernel/d' /etc/yum.conf echo 'exclude = kernel, xorg-x11-drv-*, xorg-x11-drivers, xorg-x11-server-*' >> /etc/yum.conf +# qubes-core-vm has been broken for some time - it overrides /etc/hosts; restore original content +if ! grep -q localhost /etc/hosts; then + cat < /etc/hosts +127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 `hostname` +::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 +EOF +fi + if [ "$1" != 1 ] ; then # do the rest of %post thing only when updating for the first time... exit 0