diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-06-08 21:52:03 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-06-08 21:52:03 +0000 |
commit | 90b11b80d019eb78d2de7f3903a87345f1a0fd60 (patch) | |
tree | d5f19048da6faa6a8e1e9fcbabb6584968849b68 /distrib | |
parent | 00d722d07c606f8f58abe52e6eca39d0178e4e16 (diff) |
Add FQDN to contents of /etc/myname during install.
Also remove a few extraneous braces.
Requested by and OK'd by two different Todds.
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/miniroot/install.sub | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 5c2023e4e43..30d10c5f21e 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.225 2002/05/22 01:48:38 krw Exp $ +# $OpenBSD: install.sub,v 1.226 2002/06/08 21:52:02 krw Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback @@ -1198,7 +1198,7 @@ __EOT if [ "$_url_type" = "ftp" ]; then # Need default values even if we proxy ftp... [ "$_ftp_server_login" ] || _ftp_server_login=anonymous - [ "$_ftp_server_password" ] || _ftp_server_password=root@`hostname`.${FQDN} + [ "$_ftp_server_password" ] || _ftp_server_password=root@`hostname`.$FQDN # Get login name, setting IFS to nothing so trailing or # embedded blanks are preserved! @@ -1219,7 +1219,7 @@ __EOT done else # only used by ftp_list_files() - _ftp_server_password=root@`hostname`.${FQDN} + _ftp_server_password=root@`hostname`.$FQDN fi IFS=$_oifs fi @@ -2041,6 +2041,12 @@ __EOT # override a user supplied (or previous DHCP supplied) FQDN. get_fqdn /tmp/resolv.conf /tmp/hosts + # Also add FQDN to myname + if [ "$FQDN" ]; then + sed "s/\\(.*\\)\$/\\1.${FQDN}/" /tmp/myname > /tmp/myname.new + mv /tmp/myname.new /tmp/myname + fi + resp=`route -n show | sed -ne '/^default */{ s/// s/ .*// |