From 410b30bc4194a6c84db5d73b15a7e211ce47bc9c Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Fri, 18 Oct 2019 13:33:29 -0400 Subject: [PATCH] avoid sudo resolv alert on rerun --- distro-begin | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/distro-begin b/distro-begin index abcb892..570d077 100755 --- a/distro-begin +++ b/distro-begin @@ -195,8 +195,10 @@ if [[ $HOSTNAME != $(cat /etc/hostname) ]]; then echo $HOSTNAME > /etc/hostname hostname -F /etc/hostname fi -sudo $sed -i '/^127\.0\.1\.1/d' /etc/hosts -echo "127.0.1.1 $HOSTNAME.b8.nz $HOSTNAME" | sudo tee -a /etc/hosts +sudo sed -i --follow-symlinks -f - /etc/hosts <