diff options
author | 2002-11-28 04:50:45 +0000 | |
---|---|---|
committer | 2002-11-28 04:50:45 +0000 | |
commit | adf58689cddd331f1fe3aaaa6f68faaee7dc2abc (patch) | |
tree | cbd44272a79bc43990eef9162a86994854a61066 | |
parent | spaces (diff) | |
download | wireguard-openbsd-adf58689cddd331f1fe3aaaa6f68faaee7dc2abc.tar.xz wireguard-openbsd-adf58689cddd331f1fe3aaaa6f68faaee7dc2abc.zip |
Use any existing hostname as the default, as the install could have
been restarted.
Discard any domain information the user supplies.
-rw-r--r-- | distrib/miniroot/install.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index 39a0bd6ab2e..97aad336d64 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sh,v 1.123 2002/11/28 03:06:30 deraadt Exp $ +# $OpenBSD: install.sh,v 1.124 2002/11/28 04:50:45 krw Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback @@ -315,8 +315,10 @@ fi mount_fs "-o async" -ask_until "\nEnter system hostname (short form, e.g. 'foo'):" -HOSTNAME=$resp +# Use existing hostname, if any, as the default. Discard any +# domain information supplied. +ask_until "\nSystem hostname? (short form, e.g. 'foo')" "$(hostname -s)" +HOSTNAME=${resp%%.*} FQDN=my.domain hostname $HOSTNAME.$FQDN |