summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-03-13 01:20:45 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-03-13 01:20:45 +0000
commit1a6916c69d8c0b4d44f99ef8e25658d686badaef (patch)
tree767592a4b6c749b6feee698ff8702207c82e8cbd
parenta1924f068ec6a697eef08885804e89d4c3893f80 (diff)
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.
-rw-r--r--distrib/miniroot/install.sub4
1 files 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