diff options
author | Alexander Hall <halex@cvs.openbsd.org> | 2013-12-11 06:37:47 +0000 |
---|---|---|
committer | Alexander Hall <halex@cvs.openbsd.org> | 2013-12-11 06:37:47 +0000 |
commit | 3ec6b2ff6cd47ec3325878d4bc4e28d82aacc6a2 (patch) | |
tree | 4eb5c21462974ee47143634ace8efe070789f107 | |
parent | 2713a3a02a2053c01793cab04bd7d06a165bf544 (diff) |
for automated installs, use the hostname from the dhcp lease by default
ok rpe@
-rw-r--r-- | distrib/miniroot/install.sub | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index d63662932ed..3409a834042 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.717 2013/12/09 23:14:34 halex Exp $ +# $OpenBSD: install.sub,v 1.718 2013/12/11 06:37:46 halex Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback @@ -2141,6 +2141,9 @@ get_responsefile() { $_lf) _mac=$(ifconfig $_ifdev | sed 's/.*lladdr \(.*\)/\1/p;d') + # Prime hostname with host-name option + hostname "$(sed -E '/^ *option host-name "(.*)";$/!d;s//\1/;q' $_lf)" + if [[ -z $_server ]]; then echo "Could not determine next-server." elif [[ -z $_mode ]]; then |