From 5d68e2cc7009a1d368c224e9b0a2fc7286e3a210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 27 Oct 2014 22:39:25 +0100 Subject: [PATCH] Handle tabs in /etc/hosts --- 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 2ecf8cf..77a71bf 100755 --- a/vm-init.d/qubes-core +++ b/vm-init.d/qubes-core @@ -28,7 +28,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 - sed -i "s/^\(127\.0\.0\.1 .*\) \($name \)\?\(.*\)/\1\2 $name/" /etc/hosts + sed -i "s/^\(127\.0\.0\.1[\t ].*\) \($name \)\?\(.*\)/\1\2 $name/" /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 0f236c0..8775998 100755 --- a/vm-systemd/qubes-sysinit.sh +++ b/vm-systemd/qubes-sysinit.sh @@ -62,7 +62,7 @@ done name=`$XS_READ name` if [ -n "$name" ]; then hostname $name - sed -i "s/^\(127\.0\.0\.1 .*\) \($name \)\?\(.*\)/\1\2 $name/" /etc/hosts + sed -i "s/^\(127\.0\.0\.1[\t ].*\) \($name \)\?\(.*\)/\1\2 $name/" /etc/hosts fi timezone=`$XS_READ qubes-timezone 2> /dev/null`