summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sub
diff options
context:
space:
mode:
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r--distrib/miniroot/install.sub7
1 files changed, 3 insertions, 4 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 1d9cd4eacb4..c50a7908127 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.882 2016/02/27 12:28:16 rpe Exp $
+# $OpenBSD: install.sub,v 1.883 2016/03/05 17:18:27 rpe Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -810,9 +810,8 @@ addhostent() {
[[ -z $_addr || -z $_name ]] && return
[[ $_addr == *:* ]] && _delim=":"
- sed "/^[0-9a-fA-F]*[$_delim].*[ ]$_name\$/d" /tmp/hosts \
- >/tmp/hosts.new 2>/dev/null
- mv /tmp/hosts.new /tmp/hosts
+ sed -i "/^[0-9a-fA-F]*[$_delim].*[ ]$_name\$/d" \
+ /tmp/hosts 2>/dev/null
echo "$_addr $_name" >>/tmp/hosts
}