summaryrefslogtreecommitdiff
path: root/distrib/miniroot
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2014-09-05 07:22:30 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2014-09-05 07:22:30 +0000
commit9af42551f3f25b17e8b8182a34d4cbb1a9accc3a (patch)
tree77478738f9ebe4908f84906aa10424b61251ebbc /distrib/miniroot
parent085c01176f7e1f4b822d5c45c6c95aa5e83c869c (diff)
Remove /etc/{hosts,myname} from etc.tgz.
Make the installer create the /etc/hosts template. While here, re-add a missing 'echo' from install.sh. ok miod@ krw@ halex@
Diffstat (limited to 'distrib/miniroot')
-rw-r--r--distrib/miniroot/install.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh
index 8d126463ced..df682a99585 100644
--- a/distrib/miniroot/install.sh
+++ b/distrib/miniroot/install.sh
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sh,v 1.257 2014/08/27 14:04:15 florian Exp $
+# $OpenBSD: install.sh,v 1.258 2014/09/05 07:22:29 ajacoutot Exp $
# $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
@@ -244,7 +244,11 @@ hostname >/tmp/myname
# Append entries to installed hosts file, changing '1.2.3.4 hostname'
# to '1.2.3.4 hostname.$FQDN hostname'. Leave untouched lines containing
# domain information or aliases. These are lines the user added/changed
-# manually. Note we may have no hosts file if no interfaces were configured.
+# manually.
+# Add common entries.
+echo "127.0.0.1\tlocalhost" >/mnt/etc/hosts
+echo "::1\t\tlocalhost" >>/mnt/etc/hosts
+# Note we may have no hosts file if no interfaces were configured.
if [[ -f /tmp/hosts ]]; then
_dn=$(get_fqdn)
while read _addr _hn _aliases; do
@@ -268,6 +272,8 @@ _f=dhclient.conf
[[ -f $_f && -s $_f ]] && mv $_f /mnt/etc/.
done)
+echo "done."
+
apply
if [[ -n $user ]]; then