From 1a6916c69d8c0b4d44f99ef8e25658d686badaef Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Fri, 13 Mar 2009 01:20:45 +0000 Subject: Add tab's to the whitespace pattern used to eliminate existing entries when adding a host line via addhost_entry(). Thus preventing the duplicate entries for 127.0.0.1 we started inserting when we switched to using tabs in the initial hosts file. --- distrib/miniroot/install.sub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 32ac77b541f..6b70c473e1d 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.447 2009/02/19 02:11:32 krw Exp $ +# $OpenBSD: install.sub,v 1.448 2009/03/13 01:20:44 krw Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2007 Todd Miller, Theo de Raadt, Ken Westerback @@ -479,7 +479,7 @@ addhostent() { [[ $_addr == *:* ]] && _delim=":" - sed "/^[0-9a-fA-F]*[$_delim].* $_name\$/d" /tmp/hosts >/tmp/hosts.new + sed "/^[0-9a-fA-F]*[$_delim].*[ ]$_name\$/d" /tmp/hosts >/tmp/hosts.new mv /tmp/hosts.new /tmp/hosts echo "$_addr $_name" >>/tmp/hosts -- cgit v1.2.3