From: tb Date: Mon, 18 Dec 2017 21:33:26 +0000 (+0000) Subject: Display $MODE (install/upgrade) in the prompt before we know the hostname. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4c367ffcc1aa9fb036bb9ad6de483f53eedafdbe;p=openbsd Display $MODE (install/upgrade) in the prompt before we know the hostname. suggested by deraadt ok rpe --- diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 0548b0bfab1..9e7b887721e 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1047 2017/12/17 18:29:56 rpe Exp $ +# $OpenBSD: install.sub,v 1.1048 2017/12/18 21:33:26 tb Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -2801,6 +2801,7 @@ do_install() { done [[ ${resp%%.*} != $(hostname -s) ]] && hostname "$resp" THESETS="$THESETS site$VERSION-$(hostname -s).tgz" + export PS1='\h# ' echo @@ -3081,6 +3082,7 @@ do_upgrade() { # Set system hostname and register hostname specific site set. hostname $(stripcom /tmp/i/myname) THESETS="$THESETS site$VERSION-$(hostname -s).tgz" + export PS1='\h# ' # Configure the network. enable_network @@ -3197,6 +3199,7 @@ HTTP_LIST=/tmp/i/httplist HTTP_SEC=/tmp/i/httpsec INSTALL_METHOD= NIFS=0 +export PS1="$MODE# " PUB_KEY=/etc/signify/openbsd-${VERSION}-base.pub ROOTDEV= ROOTDISK=